Monetization via mining scripts is pretty much the only way to monetize a website without charging subscription fees or selling your users' data. Compared to other means it's preserving your users' privacy. I'm not saying that I support websites running mining scripts, it's just that I don't see the alternatives as much more enticing.
It's a question of quantity and likely a lack of alternatives.
A handful of visitors will only give you a fraction of a cent, regardless of whether you monetize via advertising or via a mining script. Once you start looking at tens or even hundreds of thousands of daily visitors though, these fractions start to accumulate. I have no idea how profitable running a mining script is compared to running ads, but I presume that most websites that run mining scripts are not able to run high paying ads an alternative (eg. advertisers pay more for a blog about financial consulting than your friendly neighbourhood torrent site).