Earlier quoted context omitted.
This is a myth, mostly. First of all: no jail. This is civil law, not criminal. Second: it's pretty hard not to have an excuse to do anything you want if you're the board + management. Google, and most other companies, give to charitable organisations, for example. "Now", you'll say, "they're just doing this for PR". Maybe... But using the PR argument actually works perfectly fine for anything altruistic a company ma…
If a publicly owned company started to contribute too much money to charity, they would certainly be subject to shareholder lawsuits and a proxy war over management. Sick pay is easier to do because it's related to retaining good employees. But generally, as Milton Friedman famously wrote, "the social responsibility of corporations is to increase their profits".
(just search for [ donates], and you'll find examples of charitable donations for every single Fortune 500 company)