University of Chicago economist Gary Becker, in his Ph.D. dissertation, later made into a book, The Economics of Discrimination, showed that free markets make racial discrimination costly. His basic argument is that discrimination is a self-imposed restriction on trade that causes the discriminator to do without a good employee, a good tenant, a good product, etc.
In his first book, Dreams from My Father, Barack Obama makes the same point. Discussing the black nationalist newspaper, The Final Call, Obama writes:
The paper also carried a health section, compete with Minister Farrakhan's pork-free recipes; advertisements for Minister Farrakhan's speeches on videocassette (VISA or MasterCard accepted); and promotions for a line of toiletries--toothpaste and the like--that the Nation had launched under the brand name POWER, part of a strategy to encourage blacks to keep their money within their own community.
After a time, the ads for POWER products grew less prominent in The Final Call; it seems that many who enjoyed Minister Farrakhan's speeches continued to brush their teeth with Crest.
I'm not claiming that Obama knew he was making the point that free markets break down discrimination. The very next sentence of the second paragraph in the quote is:
That the POWER campaign sputtered said something about the difficulty that faced any black business--the barriers to entry, the lack of finance, the leg up that your competitors possessed after having kept you out of the game for over three hundred years.
What he doesn't mention is the most likely explanation: most people don't want to discriminate on racial grounds when it comes to buying products.