At the time when they killed Windows Phone they had a $7 billion write off and that was huge. A decade or so later they would buy Activision for $69 billion without blinking. I would happy swap those in an instant.
It felt like once they dropped mobile, their whole direction become misguided. Also UWP made sense when there was also a mobile/tablet side to it, could even deploy those apps to the Xbox and it kind of worked. But then they kicked out that supporting support and suddenly they got working on trashing what good Windows still had.