Public companies exist for whatever reason they put in the articles of incorporation :)
They have fiduciary duties to shareholders, most of which have been seriously distorted over the past 50 years by legal decisions.
It Was Not Always Like This (TM).
In fact, you also don't have to go all that far back (mid-late 1800's, i believe) before not only were there no limited liability corporations, but to a time when shareholders were always responsible for paying for the illegal acts of corporations.
Crazy, I know.
Public corporation: open to any old Joe or Jane that wants to become a shareholder.
Public interest: needs of a society.
Walmart, Google, etc. should not have to pay for lighthouses or sewer connections down a street, nor a legislator's fact-finding trip to Shanghai.
Remember, all of these complaints about corporate taxation would disappear if companies would simply organize as say partnerships, without the legal benefits of the corporate form. There would be substantial tax savings to this structure, because partnerships are simply pass-through vehicles (the money belongs to the shareholder immediately when it is earned). They don't do this because big partnerships are impossible to manage.