It’s not exactly the same thing because of interest. Give someone $10k in cash and they can choose to buy the toys and not pay down their existing debt, so they’ll still be paying $500 a year in interest (assuming a 5% rate).
But if you give the $10k to the lender instead, the person now has $500 more to spend every year in addition to having increased their net worth by $10k.