This is simplistic thinking. Companies can’t do anything. People do things, sometimes as a functioning part of an organization. Companies don’t decide to cut down trees for profit, people decide to take that action. When you say “a company is damaging the environment” you’re allowing a person to hide anonymously under the veil of a legal entity. Companies can’t do anything. Only people do things.
To carry through the analogy, yes, people should be afraid to deliberately and intentionally knowingly conduct illegal activity under the guise of a company.
Liability shields aren’t about knowingly committing illegal activity. They don’t protect against that. You can’t just form a company and hire people to rob banks or whatever.
Companies are to shield people from unknowingly or accidentally causing damage or committing a crime, and losing more than the capital already invested. Think situations like ‘I hired a driver, and he got drunk when I wasn’t looking and accidentally ran someone over’.
Without a liability shield, every investor or manager/owner of that company could lose everything, even if there was no way they could have known or prevented the problem - except by literally not having done business at all.