Like, let's say your intent is to donate $10k to some charity, out of the goodness of your heart and/or as a tax write off. You don't have that in cash, but do in stock.
You could liquidate $10k of stock, pay capital gains on it (if it appreciated since acquisition), then donate it. So you're out the capital gains tax.
The method you describe seems more efficient, since you don't need to sell; you simply transfer ownership of the asset.
Or is there still capital gains to be paid?
I wonder if billionaires are setting up charities as trusts for their kids, then "donating their shares to charity?"