My understanding is that that legal case really states that you can’t defraud your shareholders by funnelling money into other businesses they have no ownership in.
It doesn’t set the legal standard that profits must be maximized which is impossible.