That's a good point: a big reason for job hoppings is that employers aren't diligent about raising comp and promoting existing employees.
Obviously it's not good for the bottom line to raise pay for the same work. But trying to avoid that is short-sighted, and leads to the much greater eventual expense of turnover.
As an employee, if market comp for your work has risen substantially what your current employer pays you, then it is only rational for you to change to an employer who will. Once you find a job that will pay your market rate, the employer may try to match, but as we all know - at that point it's a bad idea to stay.
So the problem isn't "damn immature millennial job hopping", but that many employers aren't efficient at keeping up with market rates in a boom economy, and their retention rates therefore suffer. They're effectively penalizing employees who stick around and reward job hoppers.
Everyone expects layoffs and pay freezes (or even pay drops) on recessions. Why aren't the pay raises in boom times commensurate?
Blaming the "job hoppers" will not help.