Dead people don't need money, and an inheritance is infinity% return on 0 investment.
[1] Yes, yes I know. Charities are supposed to do some good. How, exactly, providing income to candy shop owner so that they can buy education for their kids is less good than your average tax avoidance charity scheme?
You don’t get to deduct the expenses from your taxation. You get to deduct the expenses from your taxable income.
That’s a big difference. You can’t make money on taxes by giving it away to charity (unless that charity is somehow fraudulently enriching you).