150 years ago, which is only a handful of generations, it was widely accepted in America that people of certain races were only technically human and were better fit for slavery than for living a full human life. That position is an extreme minority these days. What changed? Nobody eloquently argued that idea away, we merely made the culture that relied on that idea economically unviable (at gunpoint). We didn't even do a very good job of making alternative ideas more economically viable, and that hurt us deeply for the majority of that time.
If we move racist employees from company X to failing company Y, we make a non-racist culture more economically viable. People who are only weakly racist generally choose to give up on spreading their ideas (even if they still hold them) to choosing an economically worse option. People who are undecided are more likely to hear about or be part of the non-racist culture than the racist one. That is, historically, how we have been fixing racism. It hasn't been working perfectly by any means, but it's been remarkably effective.
Capitalism is actually a great racism cure. Racism was always economically unviable.
It only existed because we passed laws protecting it. For example, greedy contractors hired negroes to build stuff until congress passed the Davis-Bacon law stopping that. Jim Crow wasn't a set of "you can discriminate if you want" laws, it was "you must discriminate". It was an extremely intrusive regulatory regime to the point of regulating dating choices.
Uber doesn't care about my race. All they care about are my dollars/rupees.
Well, sort of. What's good for the economy as a whole isn't always the same as what's good for you individually. I might prefer a world in which I know my kids have good jobs, but technology remains stagnant for a generation, to one in which technology improves and the economy as a whole grows, but my kids have much less reliable jobs. (This is essentially Pigou's argument about negative externalities; capitalism is, in theory, a great environmental cure, because you can't make money without a world to make money in, but that doesn't seem to be stopping any capitalists at the moment.) Or the effects of making the economically-rational decision might be so slow and so hard to detect that an actual human will fall back on their biases and never miss the profit they could have gained by not trusting their biases. (This is Greenspan's famous argument about hiring women economists.)
There's a timely and (at least for most people) non-racist example here: immigrants on work visas. Economically, it's good for my country to hire the best possible workers at the lowest possible salary, regardless of country of origin. So why do we have borders and ensure jobs go to equally-good workers at higher salaries (or worse workers at the same salary, or both)? Because we like a world in which the employment of our countries citizens' is protected, even at the cost of our economy.
Slavery was extremely economically viable. And the fact that you need laws to make slavery illegal, but you don't need so many laws as to make Jim Crow mandatory, leaves me skeptical of the use of unguided capitalism as an effective tool for ending racism (even if in theory it would work).
This may be true, but it's completely unrelated to the point I made.
Slavery is only economically viable if you don't treat the slaves as economic agents. At the time when slavery was being debated, virtually no one actually made this argument because it was patently ridiculous.
In fact, the phrase "the dismal science" was coined by a slavery supporter to criticize the economists who opposed slavery. Slavery proponents were actually anti-capitalists who argued that slavery was better for slave and master alike - they favored hierarchical relations rather than exchanges based on mutual agreement. I know Moldbug has been shunned from society for advocating it, but you should read Carlyle if you want to understand history.
It's true that if you don't treat foreigners as economic agents, then economics does in fact suggest treating them as an exploitable resource as well. In fact, if you take that premise, we should probably enslave them rather than just pass protectionist laws against them.
One of the things that's usually attractive about capitalism is that it is, in a sense, the default. Absent a government saying otherwise, two individuals or businesses or even countries will tend towards capitalism in their relations. But absent a government saying otherwise, slavery also arises, in many places and times in history.
What changed to make people say "Hey, we're failing to treat slaves as economic agents"? It may be the case that on paper, slavery was not economically viable ever - but it was absolutely profitable and desirable in practice. (That may be the disconnect; I'm using "economically viable" in a practical sense.)
The question of who is an economic agent is exogenous to capitalism.
What changed to make people say "Hey, we're failing to treat slaves as economic agents"?
In the US, a bunch of religious crazies decided to force their biblical interpretations on everyone else. For a while they used politics and small scale warfare (e.g. running around ad night and chopping people's heads off) to push their morals on everyone else, on slavery and other issues like drinking and polygamy. Eventually the limited wars erupted into a total war for dominance, which they won.
I'm less familiar with European history so I won't speak about that.
In the way capitalism arose from pillage & plunder.
Even way before the Industrial Revolution.
The navies protected the (taxable) commerce from further pillage & plunder.
But the only ones that could afford to build any ships at all were usually the monarchs whom had already largely pillaged and plundered the wealth of their subjects.
Capitalism at this complete a level of wealth concentration reveals its eventual destructive effect on free enterprise.
Due to the extreme wealth inequality ships could justify cargoes of volunteers who would virtually pay to live as somewhat of a slave somewhere else.
Eventually it was only a matter of greed whether a particular voyage would contribute to a more advantageous outcome when choosing either physical or financial bondage for their cargoes of slaves.
When the viewpoint of the capital owners is so far removed from that of the lowest-level subjects, the difficulty for them to respect the (finer?) differences between physical vs. financial bondage of their servants in the 18th & 19th centuries evolves into the blurring of the distinction between financial bondage vs. financial empowerment of their employees in the 20th & 21st centuries.
Simply depending on where the powerful draw the line when greed is involved.
When the money must make money even under adverse conditions, the result of unbridled capitalism tends toward slavery of some form or another.
Depending on your point of view, I guess.
That said, one can meet that standard, and provide a better/cheaper transportation service and everything else in Uber's mission without standing for a toxic workplace environment for women, no matter how much they are or aren't paid. There is exactly one profession where the amount of money you are being paid justifies tolerating unwanted sexual overtures and is not the profession software developers are signing up for.