When Craigslist incorporated as a for-profit corporation and sold shares, the shares were split between the two owners of Craigslist and the rest sold to eBay. Craigslist has a history of engaging in philanthropy with a portion of their profits. eBay then sued Craigslist for breach of contract for not maximizing shareholder profits.
eBay won the case and Craigslist has been forced to reduce their philanthropy in order to maximize shareholder profit. And this not an exceptional instance. It is common practice. When a company incorporates as a for-profit corporation and sells shares then the law and courts hold the company must then maximize profits for the shareholders.
The eBay/Craigslist case is a simple one compared to the typical case. Corporations are often forced to fire employees, ditch product lines, cease research and capital upgrades projects, etc.. and to sometimes even liquidate and shut their doors all in the name of maximizing profits.
Here is the Delaware Court of Chancery ruling opinion on the eBay case by Chancellor William B. Chandler, III:
~wobbles but doesn't fall down~