Here's the math, taking an example of $1000 in pre-tax earnings that is invested for 20 years at a pre-tax rate of 10%. Say that the tax rate is 15%.
A. The "Roth IRA" case. The money is initially taxed at 15%, leaving $850 to invest. Its future value "F" in 20 years (not subject to additional tax) will be
F = $850 (1 + 0.10) exp 20 = $5,718.38
B. The "401(k)" case. The money is not taxed initially, grows tax-free, and then is taxed at 15% at the end of 20 years.
Before taxes, F = $1,000 (1 + 0.10) exp 20 = $6,727.50
After taxes, F = $6,727.50 (1 - .15) = $5,718.38
These two results are exactly the same (because of the principle that a x b x c equals b x a x c).
C. The "Non-Qualified Account" case. The money is taxed initially, and then the earnings on it are taxed every year. The effect of the yearly tax on earnings is to reduce the growth rate from 10% per year to 8.5% per year, and look what this does:
The initial after-tax amount is $850 and this grows at 8.5% per year, after-taxes, so the future amount (on which no further taxes are owed) is
F = $850 (1 + .085) exp 20 = $4,345.24
Note that a relatively modest 15% tax on the earnings has reduced the future value by $1,373.14 (24%)relative to its value in the qualified accounts, and by $2,382.26 (35%) relative to its value if it were not taxed at all.
What is happening is that the annual tax on earnings is substantially reducing the benefits of compounding. Fees paid to financial managers have the same effect. Vanguard is absolutely right when they point out the benefits of keeping these costs to a minimum -- it's not just another marketing gimmick!