How long did the tobacco industry get away with their deadly cancerous product? It’s STILL profitable to kill people.
Worse, the oil industry has demonstrated that it’s profitable to cook the planet and destroy the lives of everyone’s children and grandchildren.
You are correctly describing the ideology of capitalism. The reality doesn’t match.
Of course capitalism isn’t the only destructive system. We know about the horribleness of Soviet communism. Anything that’s deadly for our planet or our species—or the biosphere that sustains us—must be jettisoned.