I regularly hear about people giving money to charity to decrease their tax burden in the US. I don't understand the math of this. If I'm being taxed at a 40% rate, then I can give $500,000 to charity, write it off, and save $200,000 on my taxes. That's a net loss of $300,000. I may have paid less taxes, but it cost me 300 grand. It seems similar to the stereotype of the shopper who comes home with bags full of stuff and says "Everything was on sale, look how much I saved!"
Of course, if you want to give charitably, then the tax break is an added bonus, but when I hear about someone giving to charity in order to decrease their tax burden, I feel like one of us is missing something significant. Is there something here that I don't understand?