Surface, Azure, Minecraft, Github, VSCode and the whole renewed developer focus... those seem like pretty strong shifts and not just 'surfing the wave'.
They are. Microsoft, especially under Ballmer, was notoriously anti-OSS (open-source). Not only did Satya make the decision to shift the company to be cloud focused, he represented a change of guard when it was critically important to make peace with the open-source community.
Ballmer: Called Linux "Cancer". Literally.
Satya: "We are all in on open-source"
Not just that, but their core business is strong. Even with the rise of Apple and Google OSes, Windows and Office is still a humongous market.