It's true playing companies off each other isn't possible anymore. Switching jobs use to be a formula for a high rate.
But switching roles allowed people to grow and work on new and different tech. Leaving toxic situations was possible. Under the New York times union model you need to suck up the toxic environment.
The other issue is skills rot. The longer you stay in the same role the more the rot grows. At some point you can't find another role so you have to setup silos and protect the system you are working under from change. If someone tries to move your crystal report to power bi you've got to out politically muscle the request or you will be fired. The union may step in and protect you but can't forever.
Have the mass layoffs every single year taught people nothing? Newsflash, every company treats every single one of their employees as another replaceable cog in the machine. Even if you're the supreme grand wizard of space time and SQL at your FAANG job, you are still fully replaceable and will be if the business sees it as profitable to do so.
For now SWEs have it good, but this is quickly changing and techies are letting them do it because many of them have superiority complexes and naively think of themselves as indispensable to the business, as if there isn't an ocean of Eastern Europeans who'd happily take their place in the rat race to the botto.
It's a two-way street, and the companies spend a lot of money and resources to make sure people don't realize it is.