Cuba has always been a fun destination and an interest of large nations. The Spanish occupied it in the 15th century. This domination went on until 1898, when the US took over domination. The country was granted nominal independence in 1902. During all these periods, informal gambling was present in the country.
As the country gained footing after independence, gambling became more structured. By the 1920s, gambling activities were going at full throttle. Cuba was what Las Vegas is today. The main players were American tourists who flocked from the short 90-mile distance away (Cuba is just 90 miles away from California/Miami). Prohibition in America meant that Cuba, and Havana in particular, was a drinking haven. Alcohol and other debauchery items like tobacco and cigars were just the perfect catalysts for gambling. To date, Cuban cigars are legendary.
World War II caused a disturbance in Cuba, but the activity resumed soon after the war ended. It was still rampant when Batista came to power in 1952. Actually, it was getting out of hand- American gamblers were beginning to keep off. The dictator Batista and the Mob (Mafia) brought order back to gambling.
No, they did not create friendly laws. Instead, they structured casinos such that they were mainly located in high-end hotels. Cheating was solved, and protection was assured. The result was a new boom in gambling and astronomical profits. Batista was happy as long as he got his cut.
Then came Fidel Castro and the July 26th Movement. After overthrowing Batista, Castro and his communist government banned all forms of gambling in the country, including the national lottery. Masses stormed and destroyed casinos as their owners fled to the US. Castro ignored advice that such a total ban would hurt the Cuban economy.
He later went easy on the crackdown, but gambling did not pick up. There was a ban on American tourists who were the primary source of revenue for Cuban casinos. The economy was weak, meaning local clientele was but a mirage. Not even the friendly communist Soviet Union's tourists could save the gambling industry in the country. The ban remained. It was in place when Fidel handed over the country's leadership to his brother Raul in 2006, who took it well into the second decade of the 21st century.