That is like saying Toyota was going to screw itself over by releasing the Prius.
They are literally required to make the decision that most economically benefits the company
No, that not true. Many shareholders will push for that, but many companies i vest heavily into development that stifles short term profits for long term gain and running a company into the ground with poor decisions is not illegal in any way whatsoever.
How would the law even know what decisions are the most profitable anyway? That bit of misinformation needs to die.