EDIT: yeah, yeah, I hear you. You can survive on VC money, and maximize share price instead of focusing on profit. You can also be a small business owned by good people just trying to make a living, but then you still have to not get drowned out by more ruthless competition. The purpose of a business is not always to maximize profit.
That's false. The purpose of a business is whatever the owners of that business decide. I've known a large number of business owners that chose less profit in exchange for any number of other attributes they valued more than max profit: more of their own time (working less), better serving a local community by donating a lot of resources / air time (media company), paying employees abnormally higher wages (because said employees had been with them a long time and loyalty matters to some people a lot) - and so on and so forth.
Max profit is one of a zillion possible attributes to optionally optimize for as the owner of a business. The larger the owner the more say they obviously will tend to have in the culture.
Facebook as a prominent public example, hasn't been optimized for max profit at any point in the past decade. They easily could have extracted far more profit than what they did. Zuckerberg, being the voting control shareholder, chose to invest hilariously vast amounts of money into eg the Metaverse / VR. He did that on a personal lark bet, with very little evidence to suggest it would assist in maximizing profit (and at the least he was very wrong in the closer-term 10-15 year span; maybe it'll pay off 20-30 years out, doubtful).
The pursuit of max profit is a cultural attribute, a choice, and that's all. It's generally neither a legal requirement nor a moral requirement of a business.
So, in a pretty real way, there is a legal requirement, though like many such things in the United States today, it is not properly formalized.
This is quite an important distinction because it implies we may want to limit the prevalence of those things and increase the prevalence of small businesses and privately-held medium businesses that can advance other societal goals.
The government has consolidated around the current set of incentives, both directly through its own arms and indirectly through legislation and policy, leading to the result we see today. Breaking these large businesses up may lead to some disruption for awhile, but if the incentives stay the same, the same end result will likely be arrived at again before too long.
So no, profit is not a universal motive. But it's a popular one; if you have a conventional business and you expect to stay solvent year-over-year, then you make profits, you stay in the black, yes? Nobody can prognosticate when the lean years will come, and so you watch that bottom line and keep as much cushion as possible, to ride out a bad year or two.
Furthermore, if a business is competing with other businesses, that's going to moderate the profit motive with market share and other considerations. But I would say that publicly-traded companies have the strongest impetus to profit and satisfy shareholders. The publicly-traded space is far more constrained than other businesses or entities, such as charities, public interest groups, political action, NGOs, etc.