Even publicly-traded companies can choose to pursue long-term goals over short-term profit. Autodesk is rumored to be setting up a subsidiary that blends profit and non-profit motives, and plenty of companies have done other acts that are not in their short-term interests.
[1] Shlensky v. Wrigley, 95 Ill. App. 2d 173 (1968).
If, instead of succeeding, Ben & Jerry's had joined the ranks of the many other failed food retailers wouldn't the corporate officers have faced the potential of shareholder lawsuits for having blatantly "turning down good business deals" along the way?
See: Berkshire Hathaway, Apple, Facebook, Costco, Procter & Gamble (raising dividends every year for 55 straight years, try that with short term thinking) and a very long list of other companies