If I give you a gift, it is income and you owe taxes on it. If I give you a loan, it is not income and no taxes are owed. But tax man will expect you to pay it off! If I forgive you a loan, that is also taxable income, in the amount that you have not yet paid off, so no loophole there.