Writing viruses, spyware, and adware today is a business. People make a lot of money doing it. Organized crime, cybercrime groups and even legit businesses are involved. There are still high school kids involved of course but once enough people were on the internet and there was enough commerce on the internet internet crime went big time.
I think it is true that there are features about Mac OS X and Linux O/Ss that provide some greater security at least compared to Windows prior to Vista. But I also know that unknown people developed exploits that could potentially make possible remote control of computers running Mac OS X. Unknown people have demonstrated such things as a modified Unix rootkit that could potentially work on Mac OS X and a conceptual virus that could potentially work.
It is silly to argue about stuff like this. People develop O/Ss and software and people can develop exploits and malware to attack and destroy and control the software developed by other people. There are actual programmers involved in developing spyware and adware. Anybody who does not believe that apparently has not been paying attention because a major corporation was caught. It was just good luck that a guy who knew what he was doing realized during some checking of his O/S that what he was seeing had to be a rootkit. If he had not found it many years might have gone by before it was discovered if it ever would have been found. It was almost undetectable and anybody finding evidence for it had to know what they were looking at. The people who developed that software were not 'script kiddies.' They knew what they were doing, they had an assignment, they were skilled, and if they were not capable of developing software they would not be working very long. In the organized crime and cybercrime groups being fired might be the least of somebody's concerns. Failure is not tolerated in those circles.
Good people wrote productive and useful software and developed stuff like Windows, Mac OS X, and the various Linux O/Ss. It is a mistake to think the bad guy team has no talent. Give some people today a big enough paycheck and they are not going to be overly concerned about hurting other people.
Can we at least agree that Windows, Mac OS X, Linux, Unix, etc., can be useful and valuable and productive software? Well, there is some very well designed bad stuff out there too and the clever design indicates the skill level of the people involved who developed that software.
Smart people can study any O/S and find security holes. Just like castle attackers in the past could study any castle design and find weaknesses. The skill level of the good people is not that much higher than the skill level of the bad people.