So you're telling me an OS with 1.2+ billion users has bugs? I'm shocked! :)
On a more serious note, Microsoft is (was?) famous for its QA processes. They have (had?) huge computer farms, tens of thousands of machine to be able to QA with every strange configuration out there. Windows, despite the hate it gets, is one of the most QAd pieces of software out there.
And considering the shoddy architecture it has to support for backwards compatibility (CP/M, MS-DOS, Win32), it works amazingly well.