-snip-
Maybe he was not gambling in an online platform and was using a land-based casino and maybe they provide loans to their loyal customers that they can pay later if they lose or repay it back right at that time if they manage to win with the borrowed money. I'm not sure if that's the case but it is a scenario that could be.
Land-based casinos offer a lot of benefits and stuff to their loyal and high-rolling customers and I've heard this a lot, sometimes hotel rooms, free dinners, and many other things, so maybe providing loans is also one of their options.
For wealthy gamblers who have reputable names, maybe land casinos will provide these facilities because there are guarantees and benefits that can also be obtained, but it needs to be underlined that these facilities cannot be obtained by all gamblers who play at land casinos.
Gamblers who get this facility will also feel happy to the point of becoming loyal customers who are willing to spend large amounts of money playing there.
Regarding lending money given by the casino, it is actually an agreement between the dealer or the casino owner for gamblers because usually this kind of thing is very risky for both parties.
By the way, if online casinos can provide loans, even if the amount is small, it can make gamblers more loyal and at least gamblers can stay longer at the online casino to continue the game session.