Companies aren't evil, they're just things. We don't jail guns for killing people, we jail people for killing people. Why in hell should this be any different when money is involved ?
That being said, it's clearly used as a flexible mithril armor for the rich and culpable. This is modern America.
The general idea goes like this. Suppose you take out a car loan from the bank, then you drive recklessly and cause more damage than you have assets or insurance. Should the victims be able to go after the bank? Only if you don't want anybody to be able to get a car loan.
And it's the same thing with corporations. Do you want your retirement account to be able to hold index funds? With unlimited liability you can forget about it, because you'd end up being a minority shareholder in everything including whatever the next company to blow up the world economy is, and thereby get wiped out.
So that's the idea. You should be able to invest in something and limit your exposure to the amount invested.
And that's not even the problem here. What we're wanting to happen here isn't to wipe out some grandma who happened to own two shares of Purdue Pharma, it's to get after the people actually responsible for doing the deed, i.e. the managers of the company who actually made the decisions rather than the non-manager shareholders. But that is, in principle, already possible. If you incorporate a murder for hire company and then try to assert corporate limited liability when they come for you, good luck with that.
The real problem is that once a company has figured out that it's going down, it can engage in a lot of complicated restructuring that makes it hard to suss out where the money has gone by the time you get around to actually pinning the liability to them. But they'd be able to do the same thing with contracts and such regardless of limited liability. It's a hard problem, and the hardness isn't where you think it is.
The difference between the loan and the investment is that I took a loan because I couldn't afford paying for it cash, otherwise there's no reason I would augment my costs and risks (although you're going to tell me that there are ways to restructure financing to come out on top, which is exactly back to my initial point). I'm basically making a sub-optimal choice that, for a rational actor, implies coercion (i.e. I have to do it in order to get to my job, for example).
Investment is money that I say I have and consciously decide to put into the system in order to make a profit, so the comparison falls flat. Why is it that we should be for example "eco-conscious" when it comes to our consumption (what you eat, what you buy, and so on) and not our investments?
The real bullshit in this system is that we've added layers where we bet on the lack of rationality of the actors while designing systems that have that (broken) assumption baked into it.
The problem is hard because we're being wilfully ignorant, not because it's magically beyond human beings.
A fair trial will decide who is appropriately guilty, and who is not sufficiently deserving of criminal punishment.