The goal of any HR function is to protect the interests of a company from liability and lawsuits. Since managers are proxies for the company they protect them first not because they don't know they are doing misconduct but to protect the company from lawsuits.
HR is not there to ensure employees are treated fairly and to ensure a safe and productive organization. Nuff said.