For your own company, how would you set up a HR function that does not have this tendency?
But honestly it's an organizational systems and behavioral science problem. Look at the trends of HR problems that cause risk to the business (either directly through settlement or brand harm, or indirectly by losing good talent, also personal risk like being able to sleep at night), then isolate the feedback loops that allow the discord to amplify and eliminate them. So go trawl some unis that have systems researchers and spend money on IO psychologists, also listen to them because they're better educated on the subject than most business folks.
But I have to agree with the general theme of what you're saying--HR will always try to suppress the victim.