It's not that employees tend to be lazy. There are real costs to switching jobs. Depending on the industry, you may have to devote many hours studying for the interview and spend time interviewing. Switching jobs is also risky because you may not like the job as much and you'll have to rebuild all the good will.
> If companies realize that people will leave when they don't make sure salary automatically keeps pace with industry standards and inflation they will adjust their pay practices.
You're assuming inflation means wage inflation. Just because goods went up 7% doesn't mean salaries necessarily went up by that amount. An employer prices to the market for talent, not to how much people need to maintain purchasing parity relative to last year.