I think a lot of it has to do with the drive of the programmers. Sure, they'd love to have perfect code, but anyone who's programmed so much as hello_world source knows how hard that can be. The fact that most people don't work for MS to stay, but as a step towards working for other companies, and time/feature pressures, and you have a recipe for all the problems you've asked about. I'd guess that there are an embarrassingly large amount RAD/features programmers at MS compared to MS programmers with a solid understanding of the OS and the underlying hardware.
I also agree that there was very little incentive, at least until Linux showed up, to fix problems. This seems apparent from MS's sudden drive to hire back some of the people they let leave in the past. If the OS just worked, MCSE's would have to be a more skilled than some of the one's I've seen. Support would have to be at a level to make it attractive (remember, if the OS wasn't a problem, companies wouldn't be so worried about that support contract, especially smaller ones...now they are simply conditioned to need one, regardless of the quality of the software), upgrades would be deemed less important, and so on.
In short, MS's whole business structure would collapse around them. Not that anyone should feel too bad about that. After all, they're the ones that built a $40 billion dollars in cash company on it. As for the support personell, and those "poor" MCSE's that might lose their jobs? Well, most of them only bother to learn as little as they absolutely have to. I don't feel all that bad if they find themselves back at McDonalds.
Of course, I'm the cynical type.