Say open-sourcing .NET convinces a team or a startup to write their new app in C#. When it comes time to deploy to production, maybe they'll use Azure. VS has some Azure integrations to make it easy.
Now the team needs to write a mobile app. They have the option of using C# with Xamarin. Conveniently, you write Windows Phone apps in C# too, so maybe the team decides to target all three platforms instead of just the major two since they can get so much code reuse. A phone platform is really about the amount and quality of applications.
Sun was never able to monetize Java very well, but MS is in a little different circumstance since it has a cloud service and a mobile OS and hardware.
Microsoft care an awful lot less that you migrated your Oracle server to Linux if you run that server on Azure...
It's a valid strategy for keeping their corporate customers.. they have that developer mindshare, and can reduce the systems employees (SysAdmins, DBAs, etc) to boot... Too many corporate environments have dev and admin groups that are combative to eachother... "The Cloud" offers advantages in many of those environments.
I'm not saying it's for everyone, but I can see the appeal on several levels. Though working with some of the azure tools via node, it's not as bright as MS makes it out to be.
They are definitely not trying to sell windows or vs licenses with these types of moves, give away the platform and good tools and they will make it popular and make you a lot of money in other ways.
A Windows 8.1 Pro OEM license costs around $150, which if you're building a FreeBSD desktop from scratch won't come included in the purchase price.
Leads me to think back to when Steve Jobs came back to Apple and one of the first things he did was kill all the Apple-licensed Mac clones.