A year ago, there was a similar discussion
Is gambling a weird way of weath redistribution?. @OP in this thread explain correctly to illustrate how wealth is distributed through gambling, the rich lose and this make people who work for that casinos get benefit.
Now you.
Let's first talk about how the poor gives the money to the wealthy.
But the money can also go from the wealthy to the poor. If the tax from casinos gets collected by the government and is used effectively, it can help a lot of those in need. The money can be used to improve infrastructure, education, healthcare and etc.
How can poor people have money to gamble in the first place? they're poor, they don't even have enough money to pay bills. Gamblers are at least low middle class, mostly middle class because their salary enough to pay bills and they use left over money for gambling.
Your second analogy talks about the country who allow gambling, you need to know there are many country not allow gambling, but many of their citizen are gamblers. Not to mention many people choose illegal casinos over legal casinos, so the government won't get tax.