Some of it has to do with stock based compensation. I’ve not heard of any companies that, by default, renew RSUs at a dollar value comparable to what they gave the employee as a new hire (even if they’ve promoted the person!)
Even if they did, that would be less than what that employee is paid when the initial grant expired, or what they could make by moving jobs (since they’re now 4-5 years more senior).
I’ve heard people call this effect the “salary cliff.” I know a manager at $bigco that has an elaborate system to push it out a few years by gaming the system. The idea is to get a few extra years out of people before they switch jobs.
I’m not sure why this is the equilibrium the system has chosen. It might be that people put a large monetary value on having a stable set of coworkers.
More cynically, it might be political. If only a few cherry picked employees stay, and all the other organizational memory walks out the door every 4-5 years, then all the organizational power eventually accumulates in middle management.