It's not unprofitable if you aren't the one carrying the costs. It's inefficient though, that's for sure.
I assumed this whole notion of browser mining as a replacement for ads was just a laugh, but maybe not. Are there coins where it can actually make a noticeable amount of money?
edit: of course because the majority of users have integrated gpus, cpu mining will typically be faster.