If an employer is dumb enough to not hire a great worker because of their gender or skin color, then that business is doomed in the long run anyways. Because somewhere out there is a competitor who will snatch up that talented person and crush them.
Capitalism is a brutal business, but it does have a way of sorting these things out.