E. g. my current employer has a HR department that conaists of a HR division that does typical classical HR tasks, and People Development, who actually do meaningful stuff to bolster retention etc.
HR is a really hard job too, very hard to do well and very stressful. Most people never get to see this as it's part of their job that they can't talk about most things they are having to deal with.
Bad HR is a nightmare, good HR can make a massive difference to a company.
Just to add a counter in case early career people see this and take it as truth - there are companies out there who have really good HR teams who are aligned to their employees. Don't put up with shitty HR because you think all HR teams are shit.
Org I work for has really good HR teams for both the boring process stuff, and fostering a decent working environment. It's one of the strings still holding me to stay.
(1) Companies where HR is mostly administrative stuff plus risk management.
(2) Companies that claim their HR is more than that and for the employees, but when the situation seems to actually come close to resembling a dilemma, they're mostly administrative stuff plus risk management.
I have yet to hear of or experience a company that claims the latter and actually is the latter.
As you say, good HR department can help a lot in this regard - but in this function it's the same as in other main HR functions (recruitment, training, discipline issues and firing, compensation, legal compliance); most of what HR departments generally do is support for these line managers in their job of managing the employees, not support for the employees themselves.
I just haven't had that experience / have not heard from many people who have.
But that company was acquired by a massive public company. And now HR is half adversary + half bureaucratic nonsense. Interestingly, the company still offered great benefits. I assume that is because the benefits package is an easy-to-measure piece of compensation, while HR quality is something that is much harder to shop around for.
* caveat, I have no idea how HR would have acted in a situation where an employee brings up concerns that would put the company in legal jeopardy. If I had to guess, they would do the right thing in a "senior harasser vs harassed subordinate" situation. If the the company was clearly in the wrong, I think they would work hard to satisfy the employee to prevent legal jeopardy. If the employee could not be satisfied without a significant hit to the company, I'm pretty sure they would do anything they could to protect the company. And that reflects that at the end of the day, the company comes first. A good HR department can just push much harder for win-wins (and probably only under market conditions that give labor leverage).
In my experience HR organizations are mostly there as a sort of risk management for the company, everything / anything else tends to feel like just sort of HR resume fodder / token programs / company cheerleading.