Well, there was one case in the law over 100 years ago in the USA. A company had decided to sell itself for cash and go out of business. The Court ruled, that in that situation, it should sell to the highest bidder. This is long before Milton Friedman began advocating that corporations had a duty to their common shareholders that provided the only valid yardstick for evaluating corporate activities. Friedman was an economist, and a controversial one, not a lawyer, and how he got the lawyers behind him is itself a long strange story.
The idea that common shareholders own the corporation was not really obvious to anyone from the start. Common shareholders get from the corporation only what is their privilege according to the corporate bylaws and charter. There are now, and have been in the past, many different kinds of and classes of common shareholders. For example, some big corporations today have many common shareholders who do not have any voting rights. The thing that sets common shareholders apart from the other stakeholders who also hold pieces of paper from the corporation granting them various interests in the corporation, is that the common shareholders get to divide up whatever is left over if and when the corporation is liquidated and everyone else is given what they are owed first. They are more heirs than owners. It is more realistic to hold that the corporation, as an artificial person, is not and cannot be owned by other persons, and owns itself.