Microsoft has recently been playing nice with other game consoles to some extent. The software giant had announced that it would publish the game Ori and the Blind Forest Definitive Edition on Nintendo Switch. That game was initially an exclusive on the Xbox One and the PC, but Microsoft has stated that it has "no plans" to release more exclusive titles on PS4 or Switch.
As for why Microsoft first allowed exclusive games to head to other consoles and then said it would stop, it has to do with its purchasing of developers to add to the Xbox Creative team. Microsoft points out that as the new devs were purchased and brought in house, it knew that there were some existing commitments to other platforms and that it will honor those commitments.
However, Microsoft says that going forward the studios it has added to its portfolio will focus on making games only for Microsoft platforms. While Microsoft has no future plans to bring its first-party titles to other platforms, it has said that it believes deeply in cross play. Microsoft will make its IP accessible on other devices via its xCloud streaming service.
Minecraft will continue to be supported across all platforms. Nintendo and Microsoft have been rather friendly in other instances, including allowing Banjo-Kazooie to land on the Nintendo exclusive fighting game Super Smash Bros. Ultimate. It's unclear if Microsoft will continue to support similar endeavors in the future. Even though Cuphead was never an Xbox IP exclusive, Microsoft did support the launch of that game on the Switch.