If you buy $1k of stock, it appreciates to $2k, you owe taxes on the increase. If your marginal tax rate is 25%, you pay $250 on the $1k increase. If you just give the shares to the church, they get to keep the entire $2k with no taxes and you have just paid $2k in tithing using assets that were only worth (present value) $1.75k to you.