The problem is, of course, in the lack of an established, clear-cut, whole-society consensus on what is good and what is evil, and also in the inability of humans to formally define even their own criteria for that. As with porn, "I can recognize it when I see it" is a bit shaky ground for legal matters.
Speaking of the For-Profit Corporations, the profit is what pays the wages of those they employ, so, unless you agree to do programming (or any professional activity) entirely as a pastime,..