You could argue that head hunted employees that's a good match for the job they leave for probably get higher salary.
The current job of a dev is more likely to be the first job for the dev (after job jumping it's never the first job).
Since the dev age pyramid is quite base heavy, job jumping is a indirect measurement of more experience.
Just being able to job jump is a indirect measure that you are sought after and that brings higher wages.
If Starbucks starts making coffee 3x as good will people happily start paying $12 for coffee?
Because businesses would rather have a person leave and then hire someone at 1.5x or 2x their salary than just pay the first person 2x what they were making the year before.
This happens all the time. Employers want to have 2x people at 1x prices, and that doesn't work for long.
This attitude introduces a skew where your workforce gets progressively filled with people who do not switch jobs. It's a dangerous outcome, to be managed with care. If you get stuck with those who do not switch jobs because they are too incompetent, you have a big problem. If you manage to get those who are competent but content, and not very concerned with higher earnings, you have the ideal result: stable, competent, performant team, with controlled costs.
When Starbucks entered the market here, their $5 coffee was about 3x the price of the status quo cup.
Also, if businesses can't pay the market rate for labour (by definition, the money the employee can get in an open market is the market rate) then they don't have a sustainable business model.
We already know jumping gives on average a 15% salary increase every two years, so you just have to beat or match that.
Now people might still leave for more interesting projects, but you get one of the larger motivational factors out of the way.
People often leave because negotiating a salary upgrade is way harder than navigating an interview.
So, unless your hidden motive is to have cheap labor just write down in the contract that every two year the salary will increase 15% minimum, unrelated to objective bonus and all that bullshit.
The you have it. The secret for training and retaining talent in a competitive market.