AFAIK, modern corporate law never required that, and the Supreme Court was affirming the existing state of things. The "Shareholder Theory" stems from an essay Milton Friedman published in 1970 asserting that corporations have no responsibility to do anything other than maximize shareholder value, but this was never enshrined in law or financial regulation -- it was just something a lot of corporations followed. It seems in the intervening decades it's become such an accepted "truth" that people assume that it's a legal requirement.