A lot of MS’s problems come from slovenly coding practice and the language they use - C++.
If you told me that a plane I was about to board used C++ in the flight management system, I’d turn around and get the hell off. I’m that convinced that C++ is such a crappy implementation language.
C is like pointing a loaded pistol at your feet.
C++ is like pointing a minigun at your house.
But most OS’s are written in C and C++. BTW: Isn’t windows kernel written in C?