As Gary Becker pointed out, prejudice has costs for those who are prejudiced

Gary Becker pointed out that prejudice was costly to the person who was prejudiced. By refusing to hire perfectly reasonable workers just because of the colour of their skin this leaves the employer with less profit than they could have had. In time the knowledge will spread, that these now cheaper because of the discrimination workers are just fine and they will be hired by others less prejudiced. Again, in time for nothing is immediate in a market economy, the prejudiced will find themselves out competed and thus does that prejudice disappear from the workings of the economy even if not the minds of men.

It's worth noting that this was the reason for the Jim Crow laws. The prejudiced used the state to enforce what they knew the market would not.

This applies not just to race of course, it applies to any form of taste discrimination. Which brings us to something fun about the Venture Capital industry:

The vast majority of venture capitalists in the United States are men. But the distribution of women partners across VC firms is not uniform. It turns out that companies whose male senior partners have daughters are more likely to hire women as partners. And according to research published earlier this month by Paul Gompers and Sophie Wang, those companies secure superior investment returns — strong evidence that an irrational opposition to hiring women partners is holding VC firms back.

It is possible to devise reasoning as to why men are just going to be better at being a VC than women. It also seems that such reasoning would be wrong. So, why hasn't this been outcompeted then?

The answer being that "it takes time" bit. The market is a pretty wondrous human institution but it's only in the pages of the wilder textbooks that information is perfect or that things happen instantaneously. This is new information--and we know from the efficient markets hypothesis that markets are indeed efficient at incorporating new information into prices. We should thus expect rather more hiring of female VC partners and executives and thus the diminution of that prejudice.

Assuming the study itself is correct those that don't will lose out. And what the hell do we care about that? This is capitalism, recall, and people are entirely allowed to waste their money their own way. Those who continue in prejudice, once it has been pointed out to us all so that we react, will lose money. And what better way to punish a capitalist than that? 

That is, we don't actually need to do anything other than to prove this very point, that this is taste discrimination, not rational. Once that is known we can confidently expect it to disappear--for exactly the same reason those Jim Crow laws enforcing discrimination existed. Once people know they're losing money they stop doing silly things if only the law will allow them.