They are generally very friendly, and they give an aura of "we're just here to help". I don't think people will fall for this more than once, but it's pretty easy for me to see why someone would think they're "on your side".
It's right there in the name: "human resources". Employees are the resource, and HR exists to help maximize the benefit the company extracts from that resource.
Are you really not sure why anyone would think that way? Do you really believe every single person is (or should be) utterly cynical?
In a lot of orgs, an HR rep is the first person a new hire will interact with and IME they're usually very helpful, and kind -- at that point. It's not hard to see why someone unfamiliar with corporate politics or structure would see HR favorably if that's their only experience.
I think my point is, HR reps can be rather deceptive, and in some extreme cases, deliberately so. So I understand your point from a logical perspective, but thankfully, the reality is logic doesn't drive everyone.
There's a certain portion of the population who isn't skeptical of kindness, and accepts it at face value.
Chalk it up to naivety or youthful/willful ignorance, if you must. Whatever the reason there are folks who choose to see the good in people, and not constantly question their motives.
As a reformed cynic, I'd really recommend giving it a try. I personally find it less depressing way to walk though the world.
I do generally try and assume the best out of people. Most people aren't assholes, they're perfectly nice, and they probably aren't out to rob you or ruin your day.
Corporations are not people. A corporation is basically a superorganism made up of people, but functions differently. The HR person is probably a genuinely decent human, but fundamentally they still have to do their job, which is (like basically all of us) dictated by their higher-ups. Their job isn't to be your best friend, it's to make the company more money.
Ideally, it is by resolving the problem. Sometimes they need to fire someone, and in order to fire someone without the risk of a lawsuit (in a lot of jurisdictions) they kind of have to substantiate the case. Usually they and the manager will put you into some kind of "performance improvement plan" or some kind of "attitude coaching" so that they can pretend that they tried to work with you, but they will also just try and look for you to slip up and mention when you did something unkosher.
Generally by the time HR is called, it's too late, they've already decided to fire you and they're just going through the motions.
I'm sure most of the HR people are lovely humans, but that's just orthogonal to the point.
There is nothing cynical or about "corporate politics", or about any moral judgement including kindness in my previous comment.
It was purely factual and about duties (as in duties of an employee).
I think it is when people mix up all the moral concept you mention with facts and legal duties that people indeed get indeed confused.
HR may absolutely appear friendly and helpful, and they can really be so because it is their job to help you succeed as an employee, that is to say to deliver value for the company. It is not their job to help you act against the company. In fact it is their job, as it is for all employees, to work in the company's best interests (that's called fiduciary duty).
Perhaps another issue is that some, perhaps naive, people do not understand the nature (in the factual and legal sense) of employment.
But can't you see how the distinction between helping you succeed as an employee and a person might be murky for someone less experienced in the corporate world?
For many people, if someone is helping them and being extremely nice, they're not going to question why; they're just gonna sidle up with them and enjoy the time with their new friend.
Not sure why anyone would think that they are 'neutral' or trying to help employees against the interests of the company.