Well, a few reasons.
1. First, often stocks are never sold. When you pass the stock to your heirs, it's not considered a realization event. In fact, the heir gets a stepped up basis. So let's say you buy a stock for $10 and when you're on your deathbed it's $100. If you sell it, you'd need to pay cap gains tax on $90. But if you die and leave it to your kids, not only do they not have to pay, they get a cost basis of $100. So if then goes up to $200, they only pay cap gains on the $100.
This particular issue could be solved, in part, by eliminating stepped-up basis.
2. Second, there's a way really rich people can turn stocks into cash without paying tax: namely, they can borrow money and pledge their stock as collateral. This is what Larry Ellison does -- he has like $40B or some crazy amount of Oracle stock, and then he borrows money from Oracle secured by some of that stock. So he gets to live like a king tax-free (and he does!). Eventually Ellison will just default on his loan and the company will seize back his stock, but you see, he's never sold it. He got all the cash.
Now maybe the tax code recognizes that gain when the company kept the collateral upon a default and there is tax due at that point. I don't know. That's a question for tax pros. But he will have gotten 30, 40 years of enjoying cash pulled from his equity without paying a dime in taxes.
This problem could be rectified by my pet tax provision (I came up with this myself but I would be utterly shocked if I was the first; there's probably a small literature on it), which is to treat a pledge of securities as a realization event. So if you borrow against your stock, first you have to make the government right. Now, maybe you only want this rule for certain income or asset classes -- maybe it's only a thing if the amount of stock pledged is greater than a million or something like that.
3. Or, we could just kill lots of these issues by taxing gains on year to year based on stock appreciation. It doesn't have to be yearly; maybe the appreciation would be measured every three years, or on a rolling basis, to smooth out the gains and not create situations where someone pays a lot of tax in a year when the stock shoots up, and then has to claim the tax back if the stock depreciates. But these are details and weeds that can be worked out.
It would also be applicable only to large stock holdings. And if we did that, then the stockholders could raise the cash needed to pay the tax by borrowing against the stock. You know, what they do now, except instead of buying the largest yachts ever made (like Ellison), they could contribute a little to the federal budget.