MS used to call Linux cancer, and now they're running Linux servers for people. MS used to spread FUD that it's irresponsible and amateurish to expose source code of programs, and later they had to acquire GitHub and npm to stay relevant.
Microsoft had to adapt, because the old Microsoft has lost. Remember MS was selling very expensive per-CPU licenses for servers to run IIS, ASP.Net, and SqlServer. Admin tasks that we use webapps for were supposed to be a combination of Office, Access, VBA, native Windows applications, and a dash of ActiveX.
The only big part which is different is the former developer division. I do not think they earn the money themselves but are more a cost center to everyone else. But considering that everyone else is a giant company with a diverse set of developer needs, maybe that is just okay. Which again is interesting because the rest of the industry is also relying on this part of Microsoft.
Claiming there's no Microsoft on the web seems far fetched when Microsoft de facto controls extremely large parts of producing modern web applications, deploying them and serving the tools necessary for businesses to coordinate.
It may have lost share to competing applications or it missed the train exactly, but I cannot think of any other single company you can lock in your organization from management, production to deployment and even consumption on Microsoft own devices from Surfaces to Xbox.