As a corporate crisis and grief counselor, I've been called in to counsel employees at many companies that were laying off people. While I understand the need for secrecy and escorting people out right away, from my experience, I don't think that's the best way to handle layoffs.
In most cases, I don't think secrecy is necessary. Yes, the company might lose some employees as they leave to find more secure jobs. But letting people know ahead of time what may be coming and what benefits people will be receiving if they stay until the end (with possibly a bonus for doing so) helps the employees manage the transition with less feelings of betrayal, fear, and shame, as well as helps them plan better for what will happen. For example, Instead of those big purchases they might be contemplating, they have time to cut down on their expenses and save money.
Second, if you need to lock down people's computers, then do so. But let them pack up and leave that day on their own time, so they have a chance to say goodbye to their colleagues and put closure on any necessary work projects or tasks.
Third, don't pay out severance money in one lump sum. It's common to get a certain amount for each year you've worked for the company. But if that money is paid in one lump sum, which might be considerable, then it's taxed more than if it's paid out over several months. (At least that's my understanding. I'm not an accountant.)
When layoffs are done with consideration and care, as well as a generous severance package, many employees may unexpectedly find themselves in a better financial situation (if they get a new job within a few months) as well as suffering less anxiety and depression.