Donations to charities, investment in green technologies, etc. can be a way of increasing profits. Some people are looking to buy from companies which invest in the community, or operate "greener," or invest in green tech, and so on.
Using more environmentally friendly technology and building ideals can reduce costs as well, again increasing profits. I'd be willing to bet most that invest in green tech aren't doing it to be kind, they are doing it to try to get a leg up on the competition and reduce costs long-term (or so is their hope). (there is also the idea of reducing say co2 output, then lobbying for limits on it to screw the competition, while reaping the benefits of being able to say you are trying to have cleaner production, etc.)