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.
Why would you expect those? This is capitalism. Profit-making entities operate like a ratchet. They'll forward their losses to employees during recessions, but they'll pocket the gains internally during booms. Sure, redirecting some of the extra profits towards employee retention is a sound strategy, but I fear costs of turnover escape financial models in most businesses.
That has absolutely happened to me at the company I'm with. And yes, the proactive stance of eng management around keeping up with the market is one of the factors that's kept me happy there for over 4 years now.
I've also seem this sort of market matching stuff at my BigCorp in the Midwest, I've been at my company 10+ years now, and would need to take a paycut to leave basically anywhere close to local.
The point stands, but this actually happened at Microsoft in the late '90s when the dot bombs were in full swing, and anyone that could spell "HTML" was making bank. In combination with my annual review raise and the market bump, I got a 35% raise that year. Step 2 of that process is "try not to be bitter about how much you were underpaid", but 90s MSFT stock options helped ease that sting a little.
A point another commenter brought up is you never head a company say the following:
"The market is competitive and your market rate has increased, so here's a raise (of more than 2-3%)"
This leads to job hopping as well in order to get pay increases. The reason why it's especially present in applicants that recently graduated from college or a bootcamp is that their inexperience is often taken advantage of and are underpaid for lack of experience that they will likely gain in the first few months.