Not exactly - you've also got to consider the tax consequences on cashing out directly so with the charity, the money only gets taxed once instead of twice.
Scenario a:
Bob starts Hooli - his stock is now worth 100 million. He wants to give half to his family. He cashes it out and pays long term capital gains on it - at 15% he is left with 85 million. He pays out half to his relatives, but don't forget, there is 35% gift tax when you gift someone more than ~15k So of that 42 million, only about 27 million will actually make it to it's intended target.
Scenario b:
Instead of directly cashing out, he starts the foundation with the 100 million. (using that to offset his entire income that year with a charitable tax deduction most likely). He wants to pay out half to his family still - this time he is starting with 50 million which will similarly be taxed at let's say 35% (income tax) - leaving 32.5 million to pay out. Also consider the case where he exercised a large cash performance bonus upon cashing out, that 5 million he will potentially not have to pay any taxes on either because he was able to make a large tax deduction from his "charitable" gift to the foundation.
It is not a simple thing - depending on how exactly the money flows, there are ways to prevent a significant amount of double taxation. (Also a couple years ago gift tax was 55% so it would have been 19 million (scenario a) vs. 32.5 million (scenario b) in post tax money. What makes things an order of magnitude more complicated, is on top of all this one has to consider timing. Tax rates change significantly all the time (55 vs 35% on gift tax in 2010 vs 2015) - some of which are known far in advance, some changes may be a surprise - so in estate planning where the goal is to maintain wealth for many generations to come - strategies like this start to make a lot of sense