Yes, a gambling ban means nothing on the practice. There is always going to be a gambling alternative on every territories of the world, doesn't matter how restrictive the local laws are. Before the internet it was harder to find such alternatives, because clandestine houses were one of the few alternatives, although a group of friends could manage to bet among themselves without any issues too.
But now there aren't excuses. Anyone can have access to the internet and sign up at an online casino to start playing. Countries which insist in forbidding gambling are simply losing income to other countries which could be being received by themselves, if they allowed gambling by the rules.
what you say represents what actually happened. however, it is not that easy for the state to legalize it if it only refers to the income that the state will receive from casino taxes. there are other things, which certainly contradict the guidelines in some countries that prohibit it. especially the Middle East, with its symbols and beliefs as the basis for their legal basis. these things, which often make land casinos and online casinos banned there.
on the other hand, easily access online casinos from smartphones. Such things make prohibition in a country not effective. even, in this case. there are many fiat online casinos that have sprung up without a license and do not have a good reputation as a guarantee to their users. In the end, its users are the victims of a casino that has no guarantees or a credible reputation.