The HSA is a triple tax-advantaged vehicle. You can put money in pre-tax, let your money grow tax-free, and take money out on a tax-free basis so long as it is used for qualified medical expenses. If you never take money out of your HSA, it functionally operates like a 401(k), with a few exceptions. A 401(k) will allow you to begin making withdrawals with no penalty as early as 59 and a half years old. With the HSA, you can take non-qualified distributions from your HSA after 65 years old and not pay a penalty. In both of these cases, you will pay ordinary income taxes at the time you withdraw it. Aside from the age difference (5.5 years), 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.5 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.