IANAL... but here's my take on it.
If I bet you €10 that Fly A will get to the top of the wall before Fly B, lose the bet and refuse to pay you €10, you cannot sue me for the money as no exchange of goods or services was anticipated; hence no contract, hence nothing to sue on.
However, if I borrowed €10 from the bank, (advanced credit is also a loan) then used the money to bet on Fly A, lose the bet etc., again you cannot force me to pay the money over.
But, the bank has a valid contract with me, they provided a service (bank loan), I have a contract agreeing to repay it. So it's a legal contract that can be enforced.
To answer your question RK44, if your partner is borrowing money to gamble... run away now, run far and run fast...