I'm not versed in US law, and common law is quite a thing to verse for a layman. But e.g. here's a non-layman's quite clear view: https://www.wakeforestlawreview.com/2012/04/our-continuing-s...
At least in Finnish law it's very plainly clear: "The purpose of a [limited liability] company is to make profit for shareholders, unless otherwise indicated in the bylaws."
("Yhtiön toiminnan tarkoituksena on tuottaa voittoa osakkeenomistajille, jollei yhtiöjärjestyksessä määrätä toisin." Osakeyhtiölaki, luku 1 pykälä 5)
Edit: For contrast, the purpose of universities (and thus, at least in theory, university researchers) is by law to "promote free research and scientific and cultural enlightenment, give highest education based on research and raise [their] students to serve the fatherland and mankind". [pardon for some awkward to translate phrases]
Also companies, especially public companies, are typically mandated by law to prioritize profit.