I have seen so many people who would go straight to the casino on payday. These were my colleagues at work. They were so addicted to gambling that they could lose their entire salary without worrying about the consequences. It seems to me that this was the last stage of addiction. What to do next and how to live if there is no means of subsistence? What were they counting on? This is a complete fall of a person as an individual.
This happens because, in my opinion, they believe that every gamble will result in a profit, so even if they have lost, as you said, once they have enough money, they will most likely return to gambling and bet their money again. The bad thing is that they may obtain that money from illicit sources.
This really comes down to self-control. If someone has good self-control, whether they are wealthy or not, they are unlikely to withdraw the profits they have already earned. The opposite is also possible.