A company's sole purpose is to increase shareholder value; as defined by the shareholders. Some companies include things beyond a financial return, or believe being socially responsible results in greater returns; but in any case they driver is still shareholder value and shareholders ultimately vote with their wallets.
A sane company's purpose should be to:
Provide a good or service that delights customers.
Make enough money doing it that they can fairly compensate their suppliers and employees.
Put most of the remaining profits back into long-term investments.
Borrow from (and repay) shareholders as little as possible.
We lost sight of that a few decades ago, which is why our economy remains in the crapper.
We won't be able to fix it until we realize that customers and employees are more important than short-term shareholders.