It is not about the motivation but it is the feeling of recovering your losses.
Generally when a player loses in a gambling game, they have this feeling that they need to recover their losses by gambling again. Unfortunately, this is called the gambler's cycle where a player will gamble regardless of the result, either they win or lose, thereby creating an endless cycle. The only way for the player to break into this cycle is if when they decide to either quit completely or accept the fact that they will not be able to recover their losses.
It is also easier said than done for a person to quit after losing. Our initial response when we lose is to try and win again. But with the determination needed, a player can destroy this cycle and realize that such will never be recoverable.