So yes, the job of HR is to hire and fire people. And of course doing some human resources things, but in reality protect the company.
And please don't compare HR to cartels, cheez. What the actual F? In the current state of everything, I more mad at the software engineers and not at anybody else in this world. The amount of crappy software, services and products available right now is absolutely gigantic, most of us work for corporations that don't value personal lives and privacy and ready to sell your data to anybody.
Please don't put yourself above the people who worked in HR.
It is like being mad at the nurse/doctor at the hospital, that can tell you that she cannot do something for free, just because it is policy of the hospital. Sure, if she refuses to cure a dying man - that is one thing. But in this case they just let go a few people from the company, not like they throw them under the bus.