> Has Microsoft ever explored the idea of open sourcing Windows?
Good question. I have zero insight to the matter.
However, I have worked at a vendor when they decided to open source their code. It was a much smaller code base than what Windows probably is. It is quite a big effort. There can be all kind of dirty stuff in the code that you need to clean up. Either for legal reasons because you have purchased the code many years ago, but you are not allowed to publish it. So you need to dig out old contracts and have legal to check what was written when nobody even remotely thought that you could ever open source. And there might be engineering reasons that some code is so bad that you can just not show it.
Wasn't there this story some years ago that Microsoft had some odd DLL in Windows(?) that they couldn't even rebuild themselves anymore, because it required a compiler that has gone out of support years ago. I don't remember the details, but I am sure a code base with the history and size of Windows has some dark spots. Unless someone can tell me convincingly that Microsoft nowadays has a CI this that builds really everything from source in a fully reproducibly manner. I guess if they do they would have proudly reported at a software conference about it. I am not aware that they would have done that, but I am not actively following that field.