Because the law says they cannot be discharged. The law states that certain debts (it's easy to see why child support obligations are not dischargeable) are not affected by a Bankruptcy proceeding. I'm not sure as to the rationale but if you could I'd guess there would be a LOT more bankruptcy claims to get rid of school loans.