I'd argue that a propensity for gambling is essentially a propensity for risk taking, something that makes us human and commonly leads us to success (and major failures too, but this is the human condition). Many of my own successes have come via merely dicking around or dabbling in things that interested me, so I'm going to chalk it up as a win.
Richard Feynman got a Nobel prize out of 'dabbling in things that interested him'. Not everything has to have a purpose right away, good - even great - things can come from activities without direction.
yes, I see what you mean: gambling is a good trait to have in a population, but it sucks if you're the guy who has to pour all his money into fruit machines.