How far back in history do you want to go? Back in the year 1999-2000 or so, Bill Gates and Steve Ballmer were worried that Sony's control of the living room could be a threat to Windows if Sony ever tried to extend their dominance in consumers electronics to computers. The original purpose of the "DirectX Box" was to establish a beachhead in the living room and extend the Windows monopoly there to do battle with Sony, thus killing 2 birds with one stone. MS never cared about gaming, they only cared about finding a reason to fight with Sony.
Of course, Sony has never been interested in doing battle with Windows or MS, and in fact Sony instead decided to become a large media conglomerate which has nothing to do with markets MS traditionally occupied. On the other hand, MS has repeatedly attempted to invade consumer electronics. They tried to attack spinning round movie discs when they fought in the HD DVD vs. Blu-ray format war, a war that forced Sony to enlist literally the entire consumer electronics industry in a never before seen total alliance to fight MS and Toshiba. Microsoft's other ill-fated forays into battlefields beyond their monopoly strongholds include such luminary products like Zune, Surface, and Windows Phone.
Meanwhile, the Xbox brand has become probably the most important consumer-facing brand that MS has, and since nobody likes Windows and Office they have put a lot of resources into Xbox as it's also used to help improve the company's overall consumer image. The failure of Xbox is bad for the company's brand and reputation because without Xbox, MS is just that monopolist who forces everyone on Earth to resentfully use Windows and Office.
MS has spent untold hundreds of billions of US Dollars over the past few decades invading markets they have no genuine financial interest in just because quite frankly they have too much money and nothing to do with it and monopolists like to jump at shadows thinking they are threats. Sony was never a threat to MS, don't fucking care about MS, and would like it if MS fucking just leaves them alone. Meanwhile MS acts like Sony is some existential threat. It beggars belief but that's how monopolists view the world and MS is an exemplary monopolist.