Well that’s the only way you get infected with these…webmail services have their own spam filter to block these.Gmail for example blocks js downloads.Same with most of the webmail services which are very secure.
There is a reason why you don’t see too many cerber/locky infected systems over here since most are blocked at the arrival.The one’s that are missed are blocked during the binary download and caught by IDP.
I have found these type of downloader type malware come in a IT office based systems where webmail is very much used.