The main job of HR is prevent the company from entering lawsuits with (former) employees. Anything else is just window dressing. Most HR organizations like to act like they are an impartial judge in conflict situations, but they're on the company payroll after all.
So while for a single employee HR might seem like a waste of air, it's elementary for any business with a reasonable number of employees.
While you are right to note that the person signing your checks holds many of the strings, it is also true that each employee is an autonomous unit with values that they live by and advocate for, resources that they control and steward, and a contract for value exchanged.
An HR department absolutely works to protect the company, but a good HR department will also work to protect the employees, because in the long view that is also beneficial to the company. And many HR people who I've talked to specifically enjoy their jobs because they like working to make employees lives better. Where their directives conflict with that they will try to fight the directives.
Certainly in some cases where there is a unresolvable conflict between employee and employer, HR will work against the employee. But for a good HR department those situations should be very few. A good HR department will be able to project forward into a long enough view that they can find ways to move forward amicably that protect both the employee and the employer, to everyone's benefit.
Well there is also a whole bunch of really boring mundane tasks that take a lot of time, such as setting up and supporting health insurance plans, getting people into various directories, organizing the interviews, etc etc. I may look down on HR at times but boy am I glad we have them to do these things.
So while for a single employee HR might seem like a waste of air, it's elementary for any business with a reasonable number of employees.