The rule is that a corporation is primarily organized for the benefit of shareholders, but it's not exclusively organized for only that purpose, and the corporation has no obligation to maximize the benefit for shareholders today versus tomorrow, in cash versus in future equity, in certain profit versus uncertain risks, etc. So the company can choose to pay out dividends to shareholders, or reinvest profits back into the company. It can give money to charity to improve public goodwill, and it can give bonuses to non-shareholder employees to keep things running smoothly, and shareholders can't sue that their money is going to non-shareholders.
Its difficult personally to believe its a myth due to my memory of the Twitter buyout where I recall the main struggle being that the CEOs of Twitter couldn’t deny Elon purchasing Twitter due to the threat of lawsuit from their shareholders,
The article actually talks about that specific scenario, in the Revlon case. If a company is going private and buying out its shareholders, then there's not an ongoing set of broad interests to balance. The shareholders are being forced to give up their shares in exchange for cash, so if that transaction is going to go through, the corporation has an obligation to maximize the price for those shareholders. There's no today versus tomorrow, dividend versus reinvestment, etc., because that one transaction distills everything down into money for shares.
With the Twitter case, it's a bit in between the two: were the Twitter shareholders better off between taking the cash for shares today, or declining the cash to keep the company and see if that is better for them in the long term? The directors were obligated to negotiate a deal and submit that deal to a shareholder vote. So if the shareholders decide "hey this is a good deal for us," then that pretty much simplifies the question into a clear answer, rather than a complicated set of countervailing interests of uncertain weight.