It doesn't. It does shield shareholders. Sharesholders control what a company does, by choosing its directors, so if they are made responsible for a company's misdeeds, they'll have an incentive to police it.
So if I buy a few stocks in microsoft as a %0.00001 stock holder and microsoft get's another anti-trust charge I should be held liable too?
Obviously if you only hold a piffling number of shares, you have little control over the company. So it'd make sens to restrict this to major and/or controlling shareholders.