Not to mention, the entire premise is idiotic. Knowing what will produce most profits is not a simple arithmetic problem. Google could dump half their profit into advanced research and just claim "it'll pay off". Pretty much any action outside embezzlement could be claimed to be done to increase profits.
I think what we can assume is that over the long run and averaging over all public corporations, shareholders are willing and to some degree able enforce their interest in profit maximization. That doesn't mean it's true for every single corporation at every single moment in time. And you're right, it's impossible to know whether any individual action maximizes profits or not.