Why is it that when I write on Googles keyboard on my phone and misspell something it has no idea what I am trying to write but if I Google the same word it knows instantly what the word is?

Why wouldn't they use the same dictionary?