The salient rule of gambling is that, "the house always wins." Most people's investments have positive expected returns.
It actually is smart because, unlike in gambling, you tend to make more money the longer you play.