It's algorithms select the next word based on word probability within context ...
How does it do with grammatical errors that humans commonly commit? Like the one that you just committed: "It's" ("it is") instead of "Its" (possessive pronoun). Or confusing "there", "they're", "their", or "your" and "you're". Or writing "with you and I" instead of "with you and me".
Like one of the ways to spot the non-native speaker of a language being that their use of the language is much better than that of a native speaker.
On that last, my excuse is that I was highly alienated in jr. and sr. high school, so I learned English, my native language, mainly through reading. And learning German, which teaches much more English grammar in two years than 12 years of English classes ever could.
Though I've been accused of run-on sentences, but that's because of German:
a sentence is supposed to contain a complete thought and German packs a lot more thoughts into a sentence that English does. I'd love to discuss German's "extended adjective" (das ausgedehntes Eigenschaftswort) some time; eg, "the originally-having-come-from-Berlin man".