As a human resources professional, you have a dual role: you work to respond to concerns raised by employees while, at the same time, protecting the interests of the business. You achieve the latter in part by ensuring that the business is fully compliant with employment law, and that it responds appropriately to grievances raised by employees.
Discrimination is a complicated area of employment law which represents a significant risk to large companies. Discrimination is not always deliberate and you are reliant on your managers and employees being alive to potential issues and dealing with those issues appropriately (and early).