After all, it has been a massive market opportunity to include women in the workforce since almost the dawn of civilization, and yet it's taken centuries for the allegedly rational market to realize this (and even then, not fully).
Ditto in the height of the Civil Rights era there was a massive market opportunity for restaurants that were willing to serve people of color - yet this largely didn't happen.
The market - and its participants - are frequently irrational. Or maybe more accurately, sociopolitical forces have the power to skew market behavior in huge ways.
This is also why I'm also often skeptical of attempts to cast equality as an economic good - it frequently is, but basing a worldview around it seems dangerous, precisely because the market often selects against justice.
That's untrue. Black areas had high density of businesses that catered to blacks, and by large discrimination was legally mandated, not a market outcome. Business groups were in general in favor of dismantling segregation because it increased their potential market.
And I do agree with you that sometimes the market does select against justice. At the same time, prices are still the best indicators for a long of things that don't involve life or death situations.