Agree with this 100% people never seem to realise HR is there to protect the company ONLY. Literally they are a compliance function to stop company getting sued.
I've interacted with HR teams at a couple of jobs in the UK. These interactions have been fine. They have been there as the contact people to make sure I get paid for my work, that I can access my benefits, and that I am subject to the procedures and processes that I'm entitled to.
They are paid by the company and therefore they of course work for the company – and part of that job is ensuring compliance. But this is the same as e.g. a security officer, or a health and safety officer, or any number of other roles the involve running companies correctly and in accordance with best practices in a way that can benefit both company and staff. It's not an "either-or" situation!