I just don't get how things got so bad.
2017 they had a few good exclusives, a back catalog building up, pretty well every 3rd party game with maybe some gay delay thanks to sonybux, Xbox One X, auto-4k-hdr upgrades for their best xbox 360 back catalog games (!), and shortly after they started buying studios to reverse the exclusives issues.
Was it just Game Pass being such a colossal mistake?
It's fairly simple.
Xbox One was a disaster of a launch that put Microsoft
way behind Sony. Not only did they lose massive amounts of consumer trust, but they also lost a ton of trust with developers - because every person that doesn't buy an Xbox One is another person you can't sell your own video game to. Microsoft also went out of their way to make sure that Japan (one of the world centers for video game development) was designated as a "Tier 2" country and didn't even get consoles on launch - likely fucked over Devs with Dev kits for no reason after trying to make in-roads during the 360 generation. The Playstation 4 was very clearly the console generation winner and going into the next generation (XSX / PS5) it was clear that not a single developer was going to go Xbox Exclusive unless forced to at gunpoint, because Microsoft had damaged trust in such a real way. It wasn't just a PS3 level of "Sorry it was hard to develop for", it was a full on "We're acting like complete retards and have no plan to stop".
So they did what we expected - start dumping money into the space. So they started buying studios left and right, but, they never had a plan for scale. What happens when you buy a company, typically, is shareholders get fucking rich and retire. In corporate America - very often Directors, Vice Presidents, Presidents, C-Suite, etc all have Shares as part of their compensation - meaning that you'd have a huge leadership exodus each time it happens. Microsoft bought like ~15 studios. They clearly failed to account for this in their plan as very clearly the studios are suffering from a severe lack of leadership.
The lack of leadership made the studios just an absolute shitpile. Microsoft, for example, bought Tango Gameworks (Shinji Makami's Studio, who had a hand in Dino Crisis, Resident Evil, Evil Within, etc) and got Hi-Fi rush out of it, then Shinji bailed and they closed and later re-sold the studio. Obsidian clearly lost whatever "magic" they had as part of the acquisition, as did Bethesda, and seemingly every other studio Microsoft has acquired. There's not a single success story you can point to after Billions and Billions invested and a full decade of time spent on it.
They quite simply tried to scale up too fast and didn't actively prepare for it. Their leadership has just made the objectively wrong move at every step of the way and their projects are insanely disjointed for it. Third Party devs don't want to develop for an unsuccessful console with no plans to fix it.