So they've decide that the business model of the past two decades is doomed?
Windows is a commodity, a) it won't pay for its own engineering team and b) unlike other competitors, Microsoft hasn't been able to capture as much value from the current Windows ecosystem and marketplace.
Developing for Windows is becoming a liability: a) your team can't develop only for Windows anyways; b) your team can be more efficient by using a wider set of tools and technologies than Microsoft's own developers, and c) if Windows is not profitable and your product depends on Windows, it better pay for part of Windows' cost.
Internal OSS adoption, investing on cross-platform development and in Azure seem all strategic investments in managing the risks above while remaining a software (product) development company.
Every other gain from the same strategies (the ones affecting their customer base) are cherries on the top of the cake.
Are investors onboard with that?
Not sure they realize what's going on. If they did, I couldn't explain the current P/E ratio in days of declining revenue, a prospect of shrinking revenue streams (overall; medium-term at least) and large bets on lower margin businesses.
They just gave away all their products for free?
They probably wish they had invested in Office for the Web, Android and iOS much earlier on and with much more intensity, and still have given it for free. They were lucky none of the competitors really stepped up to fill the void. In a cloud-first and mobile-first world, there are multiple revenue stream available once the data information workers process is more closely tied to a provider; specially with the synergies in their product line.