There's a chance every time you enter the casino. It's not actually broken.
Viewing post in Sunfish City - a trait swap game v0.0.22.2 comments
Entering the casino makes sense it triggers and you need to gamble. But once I am inside and it triggers, I get stuck in a loop regardless of if I win or lose. The exit casino button (the one that shows up after winning a wager) doesn't send you outside, but rather back to what I think is the entrance which triggers the perk again making winning any money impossible.