If it's a publicly traded company then literally yes, public companies are mandated to make as much money for their investors as possible.
It's a very stupid law but there it is.
But eg no one has sued Google management for giving company resources to charity. And in general, companies can have all kinds of goals, as long as shareholders are ok with them.
Going on a tangent: it's usually safe to assume that investors want money, because you can further most goals you care about with money. See https://en.wikipedia.org/wiki/Instrumental_convergence for an AI flavoured take on the same topic.
> To quote the U.S. Supreme Court opinion in the recent Hobby Lobby case: “Modern corporate law does not require for-profit corporations to pursue profit at the expense of everything else, and many do not.”
https://www.nytimes.com/roomfordebate/2015/04/16/what-are-co...