There's more to onscreen keyboards than you think. At least on Apple's side, they don't just check which key you've tapped, they also check where your finger is on the key relative to its neighbors. If you want to hit a d but hit an f by accident, the keyboard remembers that the tap was pretty ambiguous and you might actually have wanted a d instead. This information helps it choose the right autocorrect candidate. If you only register which key was tapped, but not where, typing accuracy goes down considerably.
All of this was described in detail in Ken Kocienda's book about his time at Apple working on the keyboard for the original iPhone.
All of this was described in detail in Ken Kocienda's book about his time at Apple working on the keyboard for the original iPhone.