Like, remove the eligibility restrictions and just about 100% of people with a financial planner would soon have an HSA they intend not to touch until retirement, and those accounts would represent a large proportion of the cost of the program (most of it, in fact, I'd wager). At that point much of the program's cost isn't going toward helping people pay for healthcare, which is the nominal point, but toward helping people who (evidently, as they don't need to dip into their HSA before retirement) don't need help with medical bills have an even-more-advantaged retirement, meaning program efficiency for its stated purpose would suffer significantly, with much of it being diverted to improving the retirements of the already-well-off.
That's why it's gotta be restricted in some way. Not because it isn't beneficial to have even for same-year spending for people using such programs, but because the cost of the program going toward things that are not alleviating healthcare costs would go way up, which is to say, the program's efficiency (at achieving its intended goals) per dollar it costs would drop.