What's lost in this mess is that very few people actually want to job hop. They do it because they have to do it in order to have their career progress at an acceptable pace. It's risky and painful and the vast majority of people would rather not have to do it. So it sucks to be criticized for a behavior that we're forced into.
Loyalty has to be earned. If I'm pigeonholed or passed over for a promotion, damn right I'm going to start looking for another job.
Also, with all the complaints about people job hopping to increase their salaries, this wouldn't work at all if companies paid fair salaries. If companies are slow with raises and promotions, leaving their people underpaid after a couple of years, they get what they deserve when people stream out. (Obviously, this matter is different for cash-strapped startups, but people who join those aren't especially concerned about salary.)