Microsoft started as business software company, then switched to be a OS company, when this happened, their dev software divisions for example were assigned to support Windows, not develop on their own.
After Bill Gates left, that Ballmer tried to do several things at the same time, resulting specially into a Windows division detached from everything else, MS stopped making good games for windows, stopped making tools specially geared to windows (tools obviously still work, and depend on windows, but Visual Studio team is not a "windows API" team anymore, and a team on its own, with its own profits and vision), and so on.
Then they alienated windows costumers with a insistence in driver changes and creating shitty drivers (like... Xinput, instead of using the still much better Direct Input). And the destruction of some of their most popular services (ie: MSN Messenger, in Brazil people used solely the MSN Messenger to communicate, and mostly on windows, MS killed it in favour of Skype, and shot themselves in the foot HARD, because Skype is crap, and so people use other stuff)
Then they alienated Xbox costumers with the shitty Xbox one (less power than PS4, more expensive, and their headless chicken policy decision making).
They don't have a choice now, the only stuff that they are STILL making right is the business software side, everything else (costumer facing windows, xbox, mobile, games, etc...) became a sort of trainwreck.
Going "lean" on the business side, and later rebuilding the other side is possible, but trying to fix everything at once I think is much harder.