Most of the countries actually putting bans on gambling are for religious reasons and that's why it's mostly the middle east region although it's not entirely pin on those areas but I think you get the picture. Other countries are actually utilizing the massive gambling industry which is something that the government are well known for as they always exploit situation to their benefits and one way they achieve this is by taxing the gambling industry which active initiative towards this.
Including some Asian regions where Muslim-majority countries prohibit gambling for reasons that make sense why countries prohibit gambling, there are also like our country prohibits gambling because its people often experience destruction due to gambling, even though this is self-control, the government still cannot control it, so gambling is not allowed in the country.
Yeah... countries that legalize gambling will get considerable revenue because the flow of money in gambling is quite large, but for countries that prohibit gambling especially if they have a lot of resources then it doesn't matter there is no need to rely on gambling for state revenue.