Your general supposition is correct: if you had an imaginary stock that could go up 10% every year, you're better off just keeping the money in, as then you are basically doing what you say (earning 10% on the money you'd be taxed on), and you get to keep 80% of that additional 10%.
However, the real world doesn't work that way - stocks go up and down, and you want to make choices like balancing your portfolio to manage risk. That's why people sell - they don't do it to lock in taxes, they do it to lock in gains and then put the money in other things (either to make different investment choices, or to balance their portfolio's risk).
Finally, there is another consideration. That 20% tax rate isn't going to apply to you necessarily every year, depending on your income level. Let's say you don't have $100 invested, but have $50k invested. In 20 years, you are going to sell all of this to pay for your kid's college. Right now, your income excluding this stock is $350k, and you're married. That leaves you at the 15% capital gains rate, not 20%; and including this, you're still in that 15% bracket. But sell the big chunk in 20 years, and you're going to hit the big number - 20%.
Now, in 20 years you're still better off leaving it sit there - you're ahead by quite a bit ($306k vs $277k). But not nearly as much, no? And you're ahead in the sell-every-year plan up through year 8 (assuming you were indeed going over the limit that year with the sell all at once plan; obviously at that point it's less of a difference in tax rates). I'm also simplifying some here.
Finally, it's also possible that some years you might have, for example, a big capital loss somewhere else - say, you were a big believer in Sears Holdings and had their stock for the last ten years - then you could sell that (to incur the capital loss), sell this also (to incur the capital gain), end up net zero (or close enough), and then buy back in to the successful stock/fund later. This means you make your full 10% and adjust the basis price to the higher price.
In general, I think you're right - it's mostly better to sit on investments that are intended for long-term purposes. But it's not 100% cut and dried, which is why it's not something every person does.