It's all about the protocol and companies allowing other companies to connect to it. MSN Messenger and Yahoo! share the same protocol (SIMPLE) and AOL and Google share the same protocol (XMPP). That's why Microsoft chose Yahoo! to have it's integration with and not another company, the same applies to Yahoo! and Google.
When I say share, I mean they use that protocol system, they don't share the same servers etc together