They were likely making good money off the Windows Live Messenger (It's final name by the time it was killed off) because it had so many users, and was serving advertisements to all desktop users.
It wasn't that much money, but it was a user base that was leveraged many times, and that they could keep on leveraging. By killing Messenger, they disconnected users' ombilical cord to the MS social network, whatever that is.
There's still some kind of enterprise messenger that Microsoft sells. I don't remember the name of it, but I've seen it very recently in several organizations.
Office Communicator/Microsoft Lync. I can't speak to Lync (the current iteration), but Communicator, while functional, leaves a lot to be desired. I use a Mac at home. Spell-check everywhere is awesome, MS can't figure out how to unify their UIs so that useful little features are accessible everywhere. In theory it's nice because it plays well with Exchange. However, different organizations in a large corporation with their own Exchange servers may or may not be able to communicate with each other over it. And it seemed to go back and forth daily. And a ton of small UI misfeatures that make it unpleasant to work with as a communications medium (IMO, again, beter than nothing, but worse than many other options).