I thought an HSA treats the remaining money as an IRA distribution, not a tax-free benefit to a beneficiary.
Correct, Spouse inherits it as their own HSA and can use it for medical expenses. If you survive to 65, you can take any distributions taxable like a traditional IRA. So an improvement and inducement would be to allow deductions, and at age 65 or 70 allow tax free distribution and allow it to transfer tax free as a life insurance proceed.