True, there are some very dysfunctional cases. In general though, if a manager disagrees strongly enough, they can protect their reports. Yes, it might impact their personal career, but it's weird to criticize HR for just following orders and not apply the same criticisms to the manager (something I'm seeing a lot of in these discussions). The manager is much more familiar with the laid-off employee, their work, and the criteria used to judge them. Ultimately, the manager has much more final say than HR people who are essentially just messengers to shield management.