The idea that publicly traded companies have a duty to maximize shareholder value is a myth, and anyone privileged enough to sit on a board of directors likely knows this. See this article for an explanation. Every time a board squeezes a company for short term profits at the cost of long term good will, long term profits, etc., that is because they chose to do so.
EDIT: See also This NY Times article. And note that I’m not saying that corporations, board members, etc., aren’t pressured or incentivized to maximize shareholder value - I’m saying that they do not have a legal duty to do so.