My personal experience is that decisions of who get laid off tend to reflect the political agendas of those in control. I am referring to organizational politics.
Then we get follow-up situations like Ring being hacked by Ransomware group [1], where the company can't even triage [2].
Not sure how this is legal actually. I guess these companies are just betting that no one takes legal action (e.g., class-action; unionization). Maybe 2023 is the year of change.
When I read articles hinting at HR rehiring previously terminated persons [3], I immediately think this is to thwart a class-action.
[1] https://www.forbes.com/sites/daveywinder/2023/03/14/has-amaz...
[2] https://www.reddit.com/r/Ring/comments/11vqnie/ring_app_star...
[3] https://www.businessinsider.com/amazon-layoffs-vp-rehiring-l...