The HSA is a triple tax-advantaged vehicle! You can put money into your HSA pre-tax, let your money grow tax-free, and take money out on a tax-free basis for qualified medical expenses.
If you never take money out of your HSA, it works almost like a 401(k). A 401(k) lets you to begin making withdrawals with no penalty when you are 59 1/2 years old. With an HSA, you can take non-qualified distributions from your HSA after 65 years old and not pay a penalty. For both of those cases, you will pay ordinary income taxes at the time you withdraw it. Aside from the 5 1/2 year difference, the big difference is that if you use your HSA funds to pay for any qualified medical expenses, you can use that money on a tax free basis!
Additionally, if you are over 70 1/2 years old, you are required to begin taking distributions from your 401(k) or pay stiff penalties, whereas with an HSA, there is no such requirement. You can continue letting your money grow.
Source: IRC sec. 106(d)(1)
Source: Publication 969 (2018), Health Savings Accounts and Other Tax-Favored Health Plans.