The company terminates access effective immediately (maybe with gardening leave) for security reasons.
The immediate loss of institutional knowledge causes fucking havoc across the board.
So some people will be taken back on as contractors for a while at extremely expensive rates.
This also means there's a weird incentive to start hoarding knowledge if you suspect layoffs are coming down the pipe...
Was working on fixing an issue one morning, got roped into a meeting, and escorted from the building. Next week, saw an email from a coworker asking how to do something with the service. Told him, politely (don't burn bridges) that I didn't work there anymore and wasn't interested in helping that company without payment. Yeah, it might be thought of that I hung him out to dry, but that wasn't my intent. I just won't work for free, particularly when I was booted without much chance to get my affairs sorted
Or they get hired back as a contractor for 3x-4x the hourly wage as you mentioned.
I (and my team) already knew it was coming. The writing was on the wall, and we had our affairs in order. My Japanese manager appreciated it. I think the American HR manager was a bit disappointed that there wasn't much of an opportunity for the casual bullying and shaming that they do, in these circumstances. The last HR manager was OK. I had zero respect for his predecessor.
HR had the highest turnover of any department in the company. I tended to have a somewhat adversarial relationship with most of the HR managers, but the one that I respected most was fired in an explosion, more than twenty years ago, and now manages a much more prestigious organization. I sincerely wish her well, and she has my respect; little as I'm sure that means to her.
In Marketing and Sales organizations, it's common for people to be walked out the door, immediately after handing in their resignation.