Companies maximise profits for shareholders

In the USA there is a legal requirement for executives to act in the interest of shareholders, yet no executive has ever been successfully sued for donating company profits to charity.

http://fully-human.org/wp-content/uploads/2020/02/Windfall-Clause-Report.pdf

Thus, “courts [have] upheld discretionary corporate giving on the theory that donating to charity benefits the corporation,” such as through generating goodwill.

Despite early hostility to corporate philanthropy, in the handful of modern challenges thereto no American court has invalidated a corporation’s philanthropic act.