Microsoft was still the second largest developer of software for Mac
I think that statements like this are funny. It's so ambiguous that it's meaningless without more specifics. Do you mean second largest company that develops software for Mac? The company that develops the second most amount of software for Mac? The company that has the second most amount of Mac developers? Or the company that makes the second most amount of money by selling Mac software?
It really puts into perspective how dependent Microsoft is on Office. If they dropped Office for Mac it would probably accelerate the death of Office and destroy one of the key pillars to their business. They don't develop Office for Mac because there's money to be made in that market, as your post implies. As a software company, they could be making software for iOS if that was how they operated. Office for Mac still exists because it's necessary to keep Office alive. It's the same reason that they didn't make Skype exclusive to Windows when they bought it--making Skype a Windows exclusive would kill it.