My wife works in HR and there a lot of misconceptions about the field. First off, a lot of people call them "the cops of the company" or claim that they're only out to protect the company. If your HR person is any good then that is not their goal. Good HR people are there to protect the company, yes, but they're also there to protect the employees. It's been proven time and time again that being good and fair to your employees leads to more productivity. A good HR person is always fighting with the top brass trying to convince them to do the right thing for the employees. They're in the weeds with the executives explaining to them why giving a raise that just matches inflation is not a raise, and anything less is actually a demotion. They're explaining why giving benefits will actually earn the company money in the long run through employee retention. They're trying their best to get performance reports, pay bands, etc, so that employees will see feedback on their performance and receive help when they need it and increased salaries when they're excelling.
Not all HR departments are great, there are plenty that are awful, but imagine this scenario -- and this has happened to my wife many, many, many times:
You go to the executives with a plan for raises and benefits, you've been working on it for months. Both physically working on it, and in meetings explaining to the executives how this plan will not just benefit them but also the employees. After all that work, the executives take your carefully crafted plan, completely gut it despite all your advising, then hand it back to you and tell you to present it to everyone as though this was your grand dream from the beginning. It's pretty demoralizing, but you have to put on a brave face and try to remain positive while explaining "your plan", and keep all the stuff about how good it actually could have been if you'd be allowed to do what you know is right to yourself.
It's better than nothing, after all. You've made some improvement to people's experience of the workplace.
You know you've got a good HR team if you're working somewhere that has solid benefits, quarterly or semi-annual performance reports (with raises), pay bands and clear paths forward in your career, raises that at least meet inflation, a positive work culture where you feel at least some trust and comradery in your peers, etc. If you do, then those people are not your enemy.
In brief, I hope some of you reading this will take away this message: HR people are not the enemy. They're just the messengers, and the advisors. If you have a problem with the HR department where you work, then you almost certainly have a problem with the team of executives who aren't listening to their expertise.