I remember this royally backfired with Microsoft in '08 and '09. They did some rounds of layoffs, froze raises, etc. whereas all the other major tech companies held off on doing the same. There was _massive_ attrition and Balmer had to do multiple emergency pay bumps to the entire company's engineering roles to keep people from jumping ship in the following years.
It's so very sad watching this all play out again, having tried to warn people but they insisted programming was recession proof, there was no bubble, no recession, etc.
This is why we keep repeating the same mistakes. Those in power do it knowingly and the younger generation of workers knows no better.
Just a few weeks ago I warned of this in the uber hiring freeze post, and there were staunch deniers.
As an outside observer, I'll note that Microsoft's share price left its decade long nothingness in ~2010-11. Whether causal or not, perhaps it was worth it for them.