Most of the countries actually putting bans on gambling are for religious reasons
That might be the case in the most extreme measures and even with those laws, gambling will occur in those countries just not legally. However the majority of bans for gambling is not for religion but for tax and debt reasons, governments dont like competetion and banning gambling outside of the offical government lotto or similar taxed heavily controlled business that serves government is the most common reason for harsh laws or bans on gambling.