Oh wow. At first I assumed that we are talking about some guy spreading mining malware. But getting a jail sentence for merely for running a JavaScript miner... that's pretty tough.
For me it is one way of violating one's privacy, mining without our consent.
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.
One thing that I couldn't understand from these guys doing this cunny stuff online, making remote miners from PC's who visits their site is that is it really worth it? What I've known is, when it comes to mining, high end gpu's and computer's should be used for it to actually make profit from it or are they just that desperate on taking advantage of other people in exchange for few cents?
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).