Windows gets targeted simply because of its wide target audience. If the whole world used Mac OS (*shudder*) it would get targeted in the same manner. In fact, a trojan aimed exclusively at the Mac was released lately.
Mac OSX is built on a modified version of the BSD kernel and, with it, comes some absolutely crippling security flaws and bugs. Believe me, you are not safe regardless of what you use. No operating system is impenentrable, it just takes those in the know a certain period of time in which to find the flaws.