Ads are not the only nor, afaik, even the most common vector for malware. If your computer can get hacked by you just visiting a webpage, you need to fix that regardless of whether you block ads. It's a huge security problem
The difference is that websites have rep, and google polices sites with malware protection (which firefox uses too, btw).
What about ads?
(And, FWIW, Google's malware blocking applies equally to ads as it does sites you type into the address bar)
Ads means otherwise reputable websites serve malware. Even when the ads themselves are trustworthy, they very often do not have acceptable security practices, preventing interception.