If a clothing company is profitable because they use slave labor, that is not good profit.
If an oil company is profitable because they do not address the environmental impact they have, that is not good profit.
If an insurance company is profitable because they refuse required treatments for their customers, that is not good profit.
You have a very simplistic view of profit that is not based in actual history. We have centuries of seeing this exact thing happen over and over again. Just because something is profitable does not make it good. Only someone obsessed with theory while ignoring the practice could think otherwise.
The profit is not the problem. It wouldn't be any better if the company made no profit.
Capitalism is the most advanced mode of profit-driven systems. Where it inevitably leads to more and more inequality. Why? In part because money becomes the most fungible commodity. You can use it to buy everything (except happiness?). In turn you can buy all regulation. You can buy half of people’s everyday time (labor). There’s no breaks on it.
So it continues until some outside force stops it. Becaue it can’t regulate itself (with what, money?).
But another is what the owners take from the company, after paying all operating expenses. In this sense, profit is basically a form of parasitism on the company: if it weren't for the need to pay its owners, the company could better achieve its goals by re-investing that same money into operating better (buying new equipment, paying its employees more/hiring more/better employees, reducing unpopular monetization to ensure client goodwill, etc). The more money that goes out of the company to shareholders, the worse the company is at operating.
Today, at least in tech, few if any l companies post a profit in the second sense (they don't pay dividends), so we often tend to think of profit in the first sense, usually for tax reasons (taxes on cash dividends are usually payable immediately). But still, a similar phenomenon as the "parasitic" profit happnes: stock buybakcs. The company "invests" its profits into buying back its own stock, as a form of paying out shareholders through increased stock price. And, similarly to paying dividends, this takes away money that the company could have used on operating more efficiently in its core industry.
or more to the point, profits are not "bad", they are a measure of "good". profits mean you are providing something of value that people want, that without you is otherwise scarce. your profits attract competition/substitution, driving the price down and the value up to consumers.
there are many sources of distortion to markets and eliminating them increases the good that markets do, but profits are not bad, just a measure of what is happening elsewhere in the market or in adjacent markets.