Usually the reason why gambling is legalized is not because the government thinks they are opening a goldmine and will make so much money. The reason is that if they don't legalize it, the black market for gambling opportunities will explode and spread like wildfire especially on the Internet. That's why some states legalize it and raise a certain amount of tax on the activities or winnings and profits made by the casino if they are registered correctly.
Really no government (maybe except for Las Vegas) thinks about casinos as valuable employers. The tax money that casinos pay is used to cure the problems that casinos create. It doesn't contribute to society in a net positive way.
Some countries export goods to another countries to boost the economy. In their case, tourists go to their region and spend all their money at casinos, hotels and restaurants. Without gambling they would be doomed.