This is also true for most operating systems, whether they be Linux, Apple, Microsoft or Android.
Two words: Patch Tuesday.
In order of Least Secure to Most Secure:
1. Android
2. Windows
3. Apple (iOS)
4. Linux (Desktop/Server
5. Apple OS
In the case of Android and Windows, it certainly doesn't help when the core OS has numerous security holes that require constant patching. "Patch Tuesday" has been the drill for years with Microsoft's Operating Systems. Win95, Win98, Win2k, WinXP, Win7, Win8 may have had nice GUI's however the underlying security of these OS' frankly speaking: SUCKED. The amount of security infrastructure required to protect them which included Anti-Virus/Anti-Malware, Firewalls, Network Segmentation, etc.. remains a huge cost component of providing a desktop to users in companies/enterprises globally.
I'm not even going to "go there" with Android as I have one and refuse to do any sensitive transactions on it. I don't use it for online banking, checking balances, sending any sort of financial information or doing sensitive work with it, period. It's convenient for non-sensitive email, web browsing, SMS Messaging, a camera and music streaming. That's all I'll use mine for.
iOS isn't much better than Android, IMO. I stopped using my iPad two+ years ago now so I may be wrong and am willing to change my opinion.
That leaves us with Linux and Apple's OS. Both of which one has to be a complete dunderhead to mis-configure and leave open for hacking because of the amount of information that's widely available via video tutorials, online manuals, help forums, etc.. that are in easily comprehensible language.
After having used Windows Server and Desktop OS' for my entire career and Linux for the past 20, I dumped Windows for Linux exclusively at home. I was at the point I wouldn't even do my online banking on a Windows VM that I'd only start-up and shut down for that specific purpose because of all the security issues with it. I'm much more comfortable doing so with Linux.