I don't know if it's fair to compare Microsoft's efforts with Windows and Apple's with OSX. Windows runs on hardware from a variety of different vendors. OSX is pretty much commercially locked down to Apple's own hardware (unless i'm missing something?). It's actually a shame that it isn't damn hear flawless.
OS X runs pretty well on non-Apple-certified hardware. I have a Hackintosh I've been running on desktop for a few years. There's a large community around these things and users' experiences are mostly positive. Of course, this is due to the dedicated efforts of a small group of hackers.
My hardware configuration matches no Apple product.