It's an accounting term which means to assign money to an account. In an accounting equation, a "credit" is balanced by a "debit" (loss) somewhere else, in this case from a creditor. In a bad debt, the credit is given to the debtor without actual money changing hands.