I think most company-driven charity efforts won't exist if there wasn't some profit involved for them. This isn't to say that every person driving this decision cares more for profit than for the cause itself; the reason is in the way that most large corporations are able to authorize their own funds for use in this way.

Even though many people, including the initiators of the idea itself, may be in it for genuinely benevolent reasons, there's still a lot of people that need to be swayed over to the cause. Although you can try to appeal to their better natures, and possibly succeed, it's a hell of a lot easier to have there be a way for the company to profit from it, even if it's just in positive public relations.

Is it a case of the ends justifying the means? Maybe, but at any rate, even though I do think companies are mostly charitable only for the publicity, I can't say that's entirely a bad thing.