First of all I'm not a super expert on mac stuff but...
On a technical side:
the main reason it's because, as Kazrog said, it's based on UNIX, so every goddamn program it's compiled, if I'm not wrong, on c++, with c++ you don't have to install a goddamn framework (like these days on XP) to make new shit work (c#, c++ .net, VB .net programs etc etc), or other extra libraries on the machine.
You just install the stupid program, it stays in its own folder, this means your registry stays clean on mac.... if they have one anyway lol (I repeat, no mac expert here), no worries like XP.
This also mean when you uninstall it you just erase the folder most of the times.
Xp unfortunately has that registry thing that can get pretty fucked up and slow the machine, I don't think it's the main fault of Microsoft, most of the times there are companies that can't make good uninstallers that's it.
XP Got a worse filesystem, if you don't defrag the disk it becomes slow, on a side note NTFS it's reliable to recover data... not always lol.
Xp it's an OS for everyone, whatever you're using to develop (ASP.net, C#, c++, Java, VB etc etc) it's easy to develop an application.
To make your application work you have to follow few rules to make it work properly, so that's why most of the people use pc's.
But having such a variety of program languages makes it more hard for the company that makes the OS (microsoft) to keep running things smoothly.
On mac it's more rigid, just one fucking OS, basically 3 kinds of hardware (mac pro, mac book, imac) much more coding endeavor (c++), but then you just have to develop, to make shit works, on 3 fucking kind of machines, while on pc, the possibilities with all hardware configs are infinite so that's why it's more buggy
Goddamn Mac is the mighty and glory c++! no worries!!!
When windows 95 was out, it was a better time, then came windows 98 and so it was the beginning of the end.