Capital gains taxes are discounted to compensate for inflation. (10-20% vs 30-40%). It's not perfect but it's an estimate.
Also, capital gains are unearned.
CPI is a useless metric. It doesn't take into that goods and services are going down in value over time (at around 5% per year), and doesn't include hard assets that retain their value such as housing. It's a trick.
> Also, capital gains are unearned.
On average, capital gains aren't gains at all. They are simply the price of your asset going up, not its value. Housing is a perfect example - it increases in price at the same rate at which the dollar is devalued through supply increase.
One way the wealthy get around this is by taking on debt against their hard assets - generally real estate. As the price of their assets go up, they take out larger and larger loans, each time paying off the old loan and pocketing the difference tax free. The money is devalued faster than the interest rate, so even after paying interest, they are left with free money (our money), tax-free.