I don't know if many people feel the same way I do, but honestly, gambling has this magical allure that makes you always feel like you'll win the next bet. So, it's understandable why those who engage in gambling keep playing even if they consistently lose. Moreover, after a streak of losses, there's a stronger sense of certainty in your head about the next bet—a belief that forms after those previous losses.
Some people see it as experience gained from those prior losses. Also, the desire to recover losses is always present in each of us. How can you just walk away after losing the first few rounds? It's really tough to quit right then and there, and the more you play, the deeper you get, even though you keep losing, the urge to continue playing persists.
It's not magical, it's psychological. A lot of us are raised to chase wins and we always see that winning should be the thing that someone should strive for and it's a normal thing for us to believe that, it's not like we're going to have any problem with having to aspire to be a winner. The point is that we've been indoctrinated our whole life about winning that when we gamble which sees a lot of losing as a result, we often see ourselves feeling that there's something wrong with losing and so we continue to play until we hit the win not knowing that when that happens, we're hooked on the feeling of winning because we've been frustrated about losing that we want to feel that winning feeling again and so we gamble again which will be followed by a lot of losses and we also have this belief that we are guaranteed a win if we just keep on playing so that's probably my answer to your question.
Yep, that can be the psychology or belief, a belief that we will win next time and recover all those losses. It's that belief that pulls us into playing from one round to the next, even burning through our wallets. However, I also remind that gambling has a strange allure. After a few losses, you might hate it intensely at that moment, but then, after a few weeks, or even days, you find yourself drawn back to it.
You might join in right away if someone invites you to gamble, forgetting how you lost before. I don't know if this applies to everyone, but for me, it used to be like that. It's not necessarily that we are taught to pursue victory, which makes us keep diving into gambling until we win, as you say, but mostly it's the psychology of wanting to recover losses and the attraction that gambling brings.