A lot of that comes from prosecutors being a largely political office, beholden to contributors for getting elected. It's almost the worst of every angle in terms of how a justice system should work.
As an aside, I sometimes think public defenders and prosecutors should come from the same pool of attorneys, held to account for striking balance instead of just W's to one side or the other.
Another issue is even when companies are held liable they're able to nickel and dime the people they've harmed and just drag their feet through the process because the company can survive but the people they've hurt have usually lost some significant portion of their livelihood and can't fight the company for half a decade. So people are forced by necessity to take a lower payout than they actually should get because they just can't afford to fight any more. For a small infuriating sample post-Valdez Exxon argued against many tour and fishing businesses' claims saying there's no indication that those industries wouldn't have collapsed on their own in the absence of the spill so the court shouldn't take into account previous seasons' revenues for the calculation of damages.
It's arguments like that where I wish judges and the court system as a whole could do something like finding that an argument was in complete bad faith and fine the companies and lawyers just for having the gall to make it. ( I know it's a pretty bad idea in reality but that and some of the lies told to get mergers through are just infuriating)
It is worse than that. The conservative legal movement made corporate torts a big target in the 90s/00s and won a lot of victories limiting the size of judgements and the ability of affected people to sue. Even legislatures followed along based on the idea that torts were getting out of hand.
Even if you have dedicated prosecutors who are able to oppose moneyed interests, the law gives corporations huge tools to wriggle out of suits.
As an aside, I sometimes think public defenders and prosecutors should come from the same pool of attorneys, held to account for striking balance instead of just W's to one side or the other.