Why is this a bad thing? Microsoft is a company, they exist to make money. A huge new market for them is 'Cloud' and they're doing everything they can to make that as appealing as possible.
Back when they made money from selling operating systems, they were definitely doing some tree chopping with some of their practices.
Back when .Net was Windows only, they gave it away because the goal was the developers would pay a lot of money for MSDN, GUI apps on Windows, SQL Server, Office, and Sharepoint integration, etc. But .Net core is mostly server side, so I'm having trouble figuring why they'd bother giving away VS to Mac users without being forced to run on Azure in production.
It's the trickle up theory of modern development. Get folks using your languages and tools, and if you make it easy to integrate with your cloud services in those tools, that's where the revenue comes in.
It's probably an interesting number how much revenue is generated by various cloud providers for folks who just forgot to shut down their VM