Their products/services are ubiquitous not because they are good but because they got where they are today by abusing monopoly power and shady tactics.
On the business side, with M365, they use lock-in tactics and extremely aggressive bundle pricing. The only competitor is Google Workspace, and it's missing features you get bundled with something like an E5 license. So your choice becomes: just pay Microsoft $60/user/month and get Identity, Office, Intranet, MDM, EDR, DLP, ZTNA, the works. Or, buy Google Workspace and then also buy Slack, Okta, JamF (or Jumpcloud or similar), some ZTNA product, etc. and you are now at double or more the price of an E5 license.
On the consumer side with Windows, they secured their monopoly via internet explorer, and predatory OEM contracts to prevent machines being sold with anything else. Now Windows is just an ad-delivery network disguised as an OS. People don't leave Windows because its still, through those shady backroom deals, the default OS on every off the shelf PC, and because of existing software.
Microsoft has zero incentive to build a good product now, they already won. People use it because they have to not because they want to.