The people doing the lending can still make a profit. They get their interest payments and have a secured debt against the company. I.e. If interest and repayments until time of bankruptcy + liquidation of assets at bankruptcy is more than you'd get investing elsewhere at lower risk it's still a good investment. It's the other stakeholders (employees/community/unsecured debtors) that lose out.