There appears to be some speculation about something changing on the iOS keyboard / autocorrect, causing it to get worse in the past few years. You're not alone!
My previous guess was the original version had spaghetti code (ex: lots of hard coding edge cases), and they tried to move it to a more standardized / maintainable code block that hasn't been fully brought up to speed.
The guess was based on a interview video I saw discussing the various prototypes for the original iphone keyboard.