Of course there is a legal, i.e. fiduciary duty. It just isn't what most people thing it is.
To the OP, it was Welch (and others) who popularized the idea of this meaning maximizing "shareholder value", but fiduciary duty existed before then and it is the cultural context that has shifted. It lay terms, many people incorrectly think this means that you have a duty to take actions that will raise the share price. But it's much more nuanced than that.
You can absolutely be successfully sued if it can be shown that you did not act in what you reasonably believed to be the best interests of the corporation, but that is a very different thing. Basically your fiduciary duty is to act in good faith, in the interests of the company (& thereby shareholders).
It is a pretty high bar to demonstrate failure, and most normal things that shareholders might gripe about will fall well short of this, and under "business judgement". There are other checks and balances here, bear in mind that if the board is unhappy enough about the approach they can replace the CEO, etc.