It is a commonplace to the point of boringness among advocates of free markets that they make people pay to discriminate based on their tastes. A factory owner who restricts employment to whites only will face a narrower talent pool—likely paying higher wages for lower skills in total or on average. Southern US states had to pass laws to try and stop employers competing with each other over black labour and bidding up their wages.
Even owners of basketball clubs believed to be personally racist have disproportionately black teams, paying them huge sports star wages. However, not all ethnic groups have similarly prestigious or high-flying careers, and they do not all take home equal market incomes. It would be easy to jump to the conclusion that taste-based discrimination is driving this and the market isn't doing its job fully. But there is an alternative.
Employers cannot observe an employee's productivity directly, at least before they employ them. But they can observe some things about them that signal productivity—using statistics. For example, if on average south Asians or Polish migrants tend to work harder than white Brits, they can use this fact about them to help make their employment decision. This isn't racist—they don't prefer employing south Asians, and they would be equally happy to pay a white Brit £6.50 an hour to produce £7 of stuff—it's just that on average south Asians produce £7 of stuff an hour (say), whereas white Brits produce £6.40.
Which one is actually in place? We can test this. The answer is a resounding 'statistical discrimination'. For example, minorities in France did worse when a large randomised study made them anonymous in job applications—so firms couldn't see their names and thus ethnicities—implying that the reason they were called back and employed less was because their resumes/CVs were less attractive.
In Germany, job applicants with Turkish-sounding names got less callbacks than those with German-sounding names—unless both applicants had a favourable employment history reference. Then, for a given quality of reference, employers didn't care whether they were Turkish or German. On eBay, white sellers receive lower prices selling stereotypically black products and black sellers receive lower prices selling stereotypically white products, but these differences go away when sellers build up credible reputations.
US "landlord response rates across neighborhood racial compositions conform to the statistical discrimination model where agents use past experience to predict applicant quality by race." In the Israeli used car market there is "robust evidence of discrimination against Arab buyers and sellers which, the analysis suggests, is motivated by ‘statistical’ rather than ‘taste’ considerations." In an experiment selling iPod Nanos online, its being held by a black hand made buyers warier, to a similar degree as its being held by a tattooed white hand.
People do no racial discrimination whatsoever, and choose entirely based on expected points return, when picking their fantasy football team. Finally, even most of shared renting decisions in London are based on statistical concerns (some ethnic groups commit more crimes per capita), rather than personal preferences over races and ethnicities.
It is perfectly well and good to lament the fact that for whatever reason, some ethnic groups are less qualified, systematically less hard-working, achieve worse educational results, commit more crimes or whatever. This might be the result of discrimination on some other margin. But we can be pretty sure that markets are picking only on the criteria we want them to use.