In the US, the key to understanding the benefits of retirement accounts is to understand capital gains taxes and how they work.
Retirement accounts are designed for making investments throughout your career, then after several decades of contributions, withdrawing that money to pay for your needs when your full-time employment has concluded.
Normally when you invest money in a brokerage account, if the value of your investment increases, and you sell in less than a year, those investments are considered short-term gains and taxed as ordinary income. If you hold that same investment for over a year, the same investment is taxed at a lower capital gains rate (depending on which tax bracket you are in during that year, the amount due could be up to 20%, but much lower than your regular income tax rate).
When you place your money in a retirement account, you are choosing to either pay the tax due on the income when you put it in the account, or put the money in tax free and pay the tax when you withdraw (these are called tax-deferred accounts).
When you have money invested several decades, the raw dollar amount increases greatly, but inflation is also reducing the value of those dollars. Imagine you bought some bonds that payed 4% over 40 years, but inflation was 2% during those same years. When you sell those bonds 40 years later, you will owe capital gains on the entire gain even though half of the gain came from inflation.
Retirement accounts allow you to buy and sell according to your investment needs and goals without any consideration about whether the gains are short-term or long-term, and they also allow you to pay taxes just once, either when you put it in, or when you take it out, with no worries about whether you're paying taxes on inflated gains.