That's why there is a minimum contribution to the HSA before you're allowed to invest it. It's for healthy people who have saved up a big chunk and don't expect to need the money for 10 or more years, so they can park it somewhere to earn a decent return. The stock market is only a casino if you're in it for the short term.