I find it irritating when people use that line to justify their involvement in something. Typically, it's about an event or purchase that they're not sure about, but which has a sticker (or equivalent) on it saying that some benefits will go to some worthy cause. This helps the potential purchaser in their decision because they can be a good person and still a good consumer. It's smart for vendors too, because they find a way around the way some people are inclined towards virtue -- people will buy things they don't particularly want or not feel bad in participating in the ego-masturbation that the upper class does with its balls and galas. All these things are unnecessary and wasteful. People who want to help society can help it by directly, without buying junk or buying tickets to an event where they rub shoulders with other privileged elites, making a donation to the cause they care about. Anything else is tying waste, greed, and privilege to what's trying to be a generous act, and in doing so, defiling and robbing it of what good it actually says about the people involved. It doesn't even matter if the goods are donated or half the things at such an event are donated. Said efforts are much more effective when they directly go to the good cause. Don't talk to some local mothers to spend extra time baking brownies for you to sell for charity for Katrina, talk to the same local mothers and ask directly for a donation. For those people who are interested in donating to worthwhile causes, do some quick research on who you're donating to. Hint: The Salvation Army and United Way are both bad organisations to give money to. Don't give money to the random people on the street who are asking for help on these causes, because you can't research them. If you can donate time to a worthwhile cause, that's even better -- go somewhere and volunteer.
To me, charity is about two things, firstly, actually getting worthwhile things done, and secondly, the individual and social enlightenment that comes out of charity. Either without the other is a shame. All the galas and charity sales in the world, even if they managed to milk a decent amount of money from hoarders, are disappointing because no enlightenment comes at a banquet table or at a store register. Likewise, even the best intentioned way to get involved can be mismanaged to the point where little to no actual aid comes from the charity.
So, when you're at a museum or park you like, eschew the gift shop -- instead write the organisation managing it a cheque. Don't do gala events. Don't buy charity sales from people on the street. Avoid mixing donation with purchase -- at best you'll be avoiding confusion, at worst, deception.