In the US layoffs are a method of getting rid of people who are normally untouchable because they fall into the EEOC protected classifications. As long as the group laid off is statistically diverse you can let them go without getting into individual situations - Bob’s performance was acceptable but we had to let go of X people in every division for economic reasons. Whereas otherwise Bob might sue saying poor reviews or a dismissal was actually discrimination when Bob was just a lackluster employee who happened to fall under one of the EEOC categories.
The last time I was involved in a layoff they gave everyone leaving a thirty-plus page document which broke down the group by every conceivable metric to prove that the layoff didn’t target any particular demographic more then others.