While Android is 'technically' open source, from a practical sense, it is not. It's primarily controlled by the Google MADA agreement, which is how Google dictates terms to OEMs. OEMs have very little ability to negotiate this agreement, and they have almost no alternative to accepting it.
If Microsoft was able to present a viable alternative, such that manufacturers could choose to use Microsoft's flavor of Android over Google's, it'd effectively wrestle control of Android away from Google, because Google would no longer be able to impose such strong terms over access to things like the Play Store.