That line about legal obligation doesn't even pass basic analysis. Who is to say what maximizes value? Contributing to open source creates a good name, but does it harm the company by helping competitors?
It's such an idiotic line and is usually given as a poor substitute for reasoning about a company's actions.