Pay the tax now, or pay it in retirement.
A traditional 401(k) or IRA takes contributions before tax, so the deduction lands today and withdrawals in retirement are taxed as income.
A Roth is funded with money already taxed, and qualified withdrawals — contributions and all the growth — come out tax free.
The rough rule: Roth wins if your tax rate in retirement is likely to be higher than today's, traditional wins if it will be lower. Early in a career, Roth usually looks better.