I think you might be right but the other side of it is that Microsofts business outside of AI is mature other than their lock on the windows desktop you listed the others :-

Windows competitors are OSX (and the very good Apple hardware), Linux (which thanks to Valve is gaining users at an increased rate).

Teams competes against Slack/Discord

Azure competes against AWS/GCP.

Bing "competes" against Google Search

While they do have a share of each (and a big share of the desktop) they don't really have anywhere they can grow, they've filled their existing niches and are competing with other equally sized companies in all of them.

So spaffing some cash on AI on the off chance it pays off down the line might look smart.

Hell if AI does pay off then they look good and if it doesn't, it'll look bad for everyone who invested and they can at least shrug off the cash hit.