In your example above, let's say the person purchased those 10 Meta shares for $38 each at the IPO and they're worth $322 each now. That's $3220 in proceeds and a $2840 capital gain.
The taxes on this depend on income level and state of residence, but let's say they're in CA making $300K/year. They'll pay 20% federal capital gains tax + 3.8% net investment tax + 10.3% CA income tax, or $968 in taxes, and they're left with $2252.
On the other hand if they donate the shares to a charity (or DAF), they get a tax deduction for the appreciated amount ($3220), which can be taken against 35% federal income tax + 10.3% CA income tax = $1459.
So in the scenario where they just sell the shares, the proceeds after taking taxes into account are:
Donor $2252
Charity $0
And in the scenario where they donate the shares, they are: Donor $1459
Charity $3220
In other words, for an effective cost to the donor of $793, the charity gets $3220.(Also, DAFs allow claiming the deduction during high-income years and deferring distribution to charities over a longer period of time.)
If you donate to a DAF, it's 100% gone to charity, *someday."
Billionaires have access to much fancier schemes than this, and I won't even attempt to describe all those. But yeah, I imagine "donating their shares without capital gains taxes" figures into them.
I just noticed you said "trusts for their kids" -- that's something different. If the children can access it, it's not a DAF. But trusts are much more complicated, and someone who understands them (which I don't) can hold forth here.