> Usually there is a hidden variable that you don't know.
This is frequently the case. I've worked at big employers (comparable in level of corporate-ness to Google if not absolute size) where the layoff process, roughly was:
1. Aggregate layoff target gets set and apportioned amongst functional leaders, then targets cascaded down to the line manager level.
2. Managers fill out a stack ranking spreadsheet for their team across a few metrics including a boolean "diversity" field[0]. There were many rumors about the "diversity field", most notably that anyone so flagged would not be fired, but so far as I could tell these were false (see point #4)
3. People to be fired are developed based on these lists (I.e., if a manager has to fire two people, then the two lowest-ranked employees per the spreadsheet are selected.)
4. HR does a meta-analysis of all to-be-fired employees, ensuring that a disproportionate number of employees from protected classes are not impacted. If too many are, then some of the next-lowest-ranked employees are selected to be fired in their stead.
As far as I could tell, the only part of the process where any sort of individual, human consideration was occurring was maybe at the line manager level if they decided to tweak the stack rankings based on who they felt deserved to be protected. And then, to the extent that happens, you have all the problems with bias and favoritism that come into play.
0 - I realize this is probably controversial, but I saw it with my own eyes.