this is a hard decision that everyone, including upper managementI call bullshit on the inclusion of "upper management". To think upper management cares about anything other than short term profits (and their own bonuses) is just naive. When COVID hit, the company I worked for laid off 40 people (we were just a couple of hundred employees in total). You know how they laid them off? One morning they simply asked the sysadmin to turn off their logins.
It is not a "hard decision" - to them, it is just like throwing away a chair or a table. Remember that dude who laid off 900 something people on a zoom call and shit talking them later? You mentioned morale, what do you think happens the morale of the people who found half of their (small) team laid off with zero warning, like it happened to my team?
There may be exceptions of course, but it is safe to say most companies don't give a shit about their employees, even their star employees.
I am not complaining about layoffs here (though the way they do it is cruel). Just pointing out that companies are not as heartbroken about it as you seem to think. It is just business