But with compound interest you earn far more by investing the money than you give-up in tax payments when you withdraw.

I.e., you still come out far more ahead by investing then just leaving it in a bank account, even if you do pay tax when you take out.