bryanc has some good points, and I'll add a couple more thoughts:
One is that, as pointed out, UNIX is in many ways the infrastructure for the Net. Not nearly 100%, but a lot of it, and Linux is a big second part. Which web servers do you see getting compromized most frequently? Microsoft IIS. That's because it's fundamentally less secure, and unlike UNIX doesn't have 20 or so years of experience defending against hackers built-in. It also, unlike Linux and UNIX, doesn't have a huge open source community constantly hunting for and patching security holes. OSX, though partially closed-source, benefits from this history and upkeep, due to its open-source UNIX core.
OSX (or other UNIXes, or Linux) isn't virus-proof, but it is just plain built tougher than Windows.
Furthermore, the "small platform" issue doesn't sufficiently explain why Macs don't see the occasional virus--the unwaranted geek vitrol against Apple and their "toys" and smug Mac users should make us a huge target. However, when somebody eventually does write a Mac virus, our small market share will make us FAR safer than a Windows user, because we lack the critical mass to effectively sustain an epidemic.
If 1 out of every 20 people uses OSX (optimistic), and I get infected, there's a pretty good chance that most of the people the virus randomly sends e-mail to don't even have a Mac. Tight Mac-heavy industries like ad firms would be more prone to outbreaks, but the average user just doesn't have much of a chance of even getting a virus from another Mac user, because he or she probably doesn't know any, and even with the lack of virus protection on a lot of Macs the outbreak would have way more trouble getting any momentum going.
Finally, Peyote makes another good point: even if somebody wants to take us Mac users down a notch, he's not only going to have to bother to write a virus that'll infect us, but he's got to get his hands on a Mac to write it, and familiarize himself enough with the internals of the OS to write something effective. Most basement hackers aren't going to put that much time into the effort.
And heck, if they did, they'd probably end up liking their new Mac so much theyd' never release the virus.