Of course, companies know this and use it as one of the many tools to suppress wages.
But I agree, I think this is kind of weaponized by corporations to avoid employee churn.
"I was a manager for over 25 years. I feel that I was a good one. My employees seemed to agree. I kept many of them on board for decades, and these were folks that could walk out the door, and get huge pay raises (my company paid "competitive" salaries)."
It sounds like they did great by the company shareholders who captured the value from below market salaries.
Kindness, respect and trust should be table stakes but it's not going to pay for my kid's college fund, keep up with 7% inflation, or help me build my rainy day fund for a pandemic driven recession.
In our industry, we get paid a lot, for our ages (I never made as much as even entry-level folks, these days, but I had plenty of money, and still do).
It's not my fault that so many people decide to live beyond their means. Many folks would be crazy grateful for the money we waste on frivolities.
I'm not a threat to anyone here. I live my life, the way I live it. I write the software I write, and I chronicle it here. There are alternative points of view, and alternative ways of living.
I'm almost deliriously happy, in my life now. I never understood how incredibly valuable it is, to be in a position, where my work is not getting turned into raw sewage, by clueless corporations.
There are other measures of success, in life, besides money.
But I feel that the for-profit aspect applies both ways: if the company is going to work to maximize profits, why shouldn't I do the same? If another company is offering me a substantially higher salary than I would get with a normal raise, then why shouldn't I at least consider it? The company wouldn't hesitate to fire me off if they felt I was underperforming.
The only argument I can see for loyalty (and only kind of) is if you work for a non-profit, or something run on a finite research grant or something. At that point, you could argue that loyalty isn't naive as the work itself is more the goal than the profit motive.