I'm sure Apple has known about these upcoming lawsuits for months as well. Perhaps it is just lucky timing, but I am a bit skeptical. This issue has been around since iOS 5. I think Apple just didn't prioritize it because it discouraged people from leaving the iOS ecosystem. But the problem is that it was hurting current iOS users trying to message non-iOS users. It should of been addressed long before now honestly.
Well, Apple said they plugged a server side bug, so they were working on the issue(s). As for why it took so long, it's hard to pin down. It could be multiple factors, such as finding the elusive causes, or the fix may be in many parts (e.g., each telco handles it differently). Plus complicated by iOS7 rewrite.
There was an article on a developer trying to write a messaging app on top of Android but gave up. It's non-trivial to map each telco's SMS/MMS infrastructure to a simple, unified behavior and interface. In this case, it's like telling WhatsApp to send messages to a non-WhatsApp user, they can do it but my guess is they also have tons of features and other bug fixes to release for existing users first.