I have never seen a law that says such a thing. Shareholders get to vote respective to the rights of their share class...That's about it. Other than embezzlement and other forms of fraud, a company can do as they like.
check out any company's s-1 filing. here's google's for reference: http://i.i.com.com/cnwk.1d/pdf/ne/2004/google.pdf
just search through that for the phrase 'shareholder'. here's just a small taste: We will make decisions on business fundamentals... and always with the long term welfare of our company and shareholders in mind
and 'lest you forget, the board of yahoo was actually sued for initially rebuffing the microsoft takeover bid.
As to Yahoo or anyone else getting sued by shareholders, sure you can sue. The courts may take into account actions of corporate execs and decide they haven't been listening to the shareholders. But it really depends on what the shareholder rights are in any given corp. Was Yahoo required to put a buyout offer to a shareholder vote, but did not? If so, the shareholders have legal standing. But its not the reason you state: "exist for the sole purpose of advancing their shareholder's interest (profit). period. end of story."
In fact, I'll wager you cannot find such a clear law that supports your position.