It seems like companies are really having a hard time understanding that people are not going to just take financial hits out of loyalty to a company anymore. Companies still appear to be of the mindset that they can give small cost of living increases and people will stick around for years in hopes of getting promoted. With inflation at 9%, getting a 20% raise after 2 years with a promotion essentially just sets you back at your starting salary with more work and responsibility. Why would anyone stick around for that? Plus there are only so many positions available to be promoted into, statistically the odds are not good for most. Coupled with the fact that companies are very open that they have zero loyalty to any employee below c-suite, its not really surprising people are only keeping jobs for a couple years before being forced to look somewhere else.
First of all, job hunting takes time and effort. If you're rusty at interviewing and need some practice, then even more so. People that have kids or other responsibilities outside of work have even less of both available. On top of that you have to face rejection, which for many people is emotionally difficult.
Secondly, even if everything goes well, it's still a substantial risk. The new job might seem great at first, then turn out to be a nightmare a couple of months in. The old job might not be ideal, but you're used to it, and know you can live with it -- it's the devil you know. Same way that couples often stay in unsatisfying relationships for years, because it seems better than risking ending up alone.
I have kids and need a raise each year to afford to buy them the things they need while still having a hope of retiring one day.
"The new job might seem great at first, then turn out to be a nightmare a couple of months in"
This is pretty much most of my jobs. The current one is probably the nicest I have had in a long time but I still need a raise as the thought of working until 65 just to be old and then die fills me with existential dread.