I believe that beggars don't gamble for fun. So do you think that it's because they feel that they don't have anything to loose and somebody will still give them money if they lose? How will you feel if you see a beggar that you just gave your hard earned money using it to gamble?
It's very hard to answer if we are going to talk about morality here, of course everyone can go and play, as it is their right. But here there are a lot of pros/cons. Just imagine if the money that you give to the beggar, he gambles it and won, it could change his life, or potentially improved his situation.
But with the cons, what if the outcome is not favorable to them, and could really put them in dire need. And obviously, the cycle will repeat itself, they are going back to the street, begs for more money and then continue to gamble.
And with that, there is this argument that we shouldn't really give money to them because they are going to be free loaders for the rest of their lives. But then again, we have been religiously teach in school to give to others and help. So I guess this is also a never ending debate.