For Microsoft, the key threat is that the Steam Deck isn't even a Windows OS device by default, let alone having Microsoft's Xbox services and Game Pass on it. Valve has used the platform, very successfully, to evolve Steam from being simply a digital store that runs (usually) on Windows, into being a very capable gaming OS in its own right.
That, perhaps more than anything else happening in the industry in recent years, is a threat to Microsoft's plans for the Xbox platform and gaming more broadly – and if the success of the Steam Deck is a key component of that threat, then creating an Xbox device to compete directly in that space seems like the logical response.
And there's the real reason why Microsoft cares. The success of the Steam Deck is a threat to Windows because it runs Linux. Also, the more games that run on the Steam Deck means the more games run on Linux.
Microsoft normally solves problems like this by abusing their monopoly and crushing their competition. In this case though, Microsoft is the underdog since Steam is the one with a much larger gaming monopoly. They're going to have to spend billions and billions if they want to stand a chance against the Steam Deck.
The other enormous problem they face is that Windows is very, very far behind when it comes to technology compared to Linux. Devices made for Linux vastly outperform the best hardware that runs Windows. Even if that hardware was made to run Windows!
Windows is decades behind Linux from a technological development standpoint. For example, Windows is still running the same filesystem from over 30 years ago!
What this means is that for any given portable hardware Linux is going to vastly outperform Windows in basically every benchmark from battery life to frame rate. That doesn't even include the fact that in Windows you're forced to install many background apps (and kernel level ~~rootkit~~ anti-cheat) that takes up memory and slows everything down just to get basic security and play games.