That may or may not be true, but it's not the reason that Macs have kept the self-replicating virus at bay. The macOS is just secure. That old "market share" line just won't die, even though much has been written to debunk it.
The false statement here is that MacOS is just secure. Blatantly false.
It's the fact that there is more reason to attack the Windows OS that results in it being
more vulnerable.
All OSes are vulnerable to attack. Some are more vulnerable due to the shear number of attacks being waged on them. Go figure as to why Windows tops the charts as the most vulnerable OS... highest user base = highest number of potential targets.
Don't fool yourself into thinking your OS is secure... EVEN WITH anti-virus software or any other third-party application protecting it, all they can do is protect you from known attacks. They cannot protect you from things that haven't already been identified.
Trust me, if the hackers truly cared about bringing down the OS, they would. They just really don't care too. That is why Macs
seem so secure. It's a false sense of security. If the shoe were on the other foot and Windows had the user base of Macs and MacOS had the user base of PCs... the tables would be turned.
I haven't had the need for such third party protection on my Macs because they have never been on the radar of the hackers for all that time. Now my bootcamp partition... that's a whole different story. That baby is under constant barrage because... get this... it's running Windows. All of a sudden my sweet Mac rig is a tasty morsel to them because I am playing in their sand box.