I’m not sure if you are being intentionally obtuse, but the obvious answer is that rather than being locked out in the middle of the night, people would prefer to be told directly by a human (ideally their manager), and given the opportunity to say goodbye to their colleagues.
That’s a complete straw man. Microsoft, Meta and others managed to pull off safely laying off employees while still treating them respectfully and allowing them to say goodbye.