Because of him.
Ballmer backed the "Enterprise Business" (precursor of Office 365) and "Server and Tools" (precursor of Azure and MS Security) divisions over the then prominent "Windows" division.
MS back then was in a weird transitional phase where it as a company needed to decide whether it wanted to prioritize B2C or B2B/Enterprise. Ballmer made the call to go for Enterprise.
There was also no guarantee that then-resurgent Apple or new-kid-on-the-block Google wouldn't be able to eat into MS's Enterprise market share with release of the iPad+iWork and Google Apps (now Google Workspaces) respectively.
Before Ballmer, it was the Windows and B2C teams that had the upper hand internally at MS instead of Enterprise.