HDB certainly helps to lower the barrier to entry in home ownership. But I don't think most forms of HDB purchases are investment-orientated. ROI for second-hand HDB is not high and buying a good first-hand one is like winning a lucky draw.
I would say HDB is more of the gov's mean to stabilize the housing market and it functions as more like the backbone of the economy. (Or you end up with runaway prices like in Hong Kong.)
HDBs are similar to property in most countries. It’s bought primary as a place to live but also as a store of value. The govt will buy out your HDB for cash in order to fund your CPF. The govt also constrains the supply of HDBs which pushes up values.
But you are right about the lucky draw. Someone people win BTO lottery and make out like bandits with new developments in mature estates.
Housing is basically a govt supported investment program in Singapore. Not that different than most Western countries, just different mechanism.