So, in your opinion, any other operating system is safe? What about the macOS malware? If you do user management wrong and are not careful, *NIX systems are not safe at all! What about all the attacks on Linux, because of sloppy software configurations? You think, Linux is safe? Only if you know what you are doing!
There are so many Windows infections because most people use that system as their desktop system at home. If everyone used macOS, there would be lots of malware for macOS. It's easier to infect individuals than companies which usually (should) hire professionals.