Right, but it's still a net loss to them. If I have $200M in unrealized long-term capital gains (taxed federally at 20% for 2015), I have $160M in after tax potential. By donating $100M, I'm losing $60M in potential cash as opposed to paying my fair share. Aside from certain intangible benefits from donating my stock, I'm actively incentivized (to the tune of $60M) NOT to donate.
There is at least one caveat to the above. As long as I donate to a 501(c)(3) entity, I can choose any entity I want - even one I control. The Bill and Melinda Gates foundation is an example of an extremely wealthy couple "donating" to an entity they effectively control. (I assume they do, since it bears their name. I haven't looked up their management structure.) This entity must use their donations in accordance with the entity's stated mission statement, or they risk losing their non-profit status. Beyond this, the donated money is still mostly controlled (within the bounds of the non-profit's stated mission) by the wealthy couple that donated. Aside from using the funds for "pet" projects with dubious public value, this opens up another potential caveat, non-profit bribery.
It is possible for donations or non-profit entity direction to be applied as a tax-free bribe. I might donate to develop a park in a city I hope to win a contract from. I could fund a non-profit campaign for reform on legislation that might benefit an industry my business is in. I could direct a non-profit I control to purchase supplies from a specific vendor as a favor for special consideration in pricing.