As per great answer of BoboDarph
That dept. is not there to give you justice. They just do whatever's best for the company, even if that's not right for you individually, even if it's slightly illegal, even if they have to cover stuff up (their asses included). As long as management is happy, HR is also happy.
Companies are not court houses, they do not dispense justice, most of them are led by people who only care about the bottom line for their investors. HR is there to help optimize the costs by ensuring employee compliance to internal rules and legal requirements, not to settle disputes between co-workers. They do that only to prevent legal action by employees or the state, and usually are pretty ruthless in defending the company when such possibility arises.