Governments can do a lot of things to control people's vices gambling being one of them.
But if they see that they are making a good amount of taxation from games like lotteries which are often government sponsored and taxing the casinos why they will try to ban them?
The ultimate objective of any government is for the ruling party to make money. So they will extort it through taxation and licenses and many others.
Religious people are old enough to decide on their own if they want to gamble or not. Nobody needs to babysit them for it.
They will soon find out that banning would just give the rise of black market or illegal activities. Because no matter what, people will gamble as it is part of human nature. So better regulate it rather than ban this activity. At least, get some taxes out of it and not let it operate underground.
We all know that gambling is tied to different negative activities, however, it is not the gambling itself that is bad, but the gamblers who can't contain themselves about their gambling habits that are the culprits of these activities. The government would just suffer the burden of underground operation as there will be more criminal or unlawful activities that will emerge from this type of operation, so the government should just regulate it rather than totally scrap this business.