Microsoft absolutely expands into areas it considers strategic profit or capability centers. E.g. office productivity, web browser, database, gaming, etc.
But they, and especially early/smaller Microsoft (90s-00s), left a ton of money on the table for the good of the platform. Because they realized they couldn't do it all and be best-of-everything.
The fact that Microsoft can deploy its level of resources (e.g. crush Lotus) when they decide to doesn't mean that they always decide to.