Why is it legal for me to get out of paying back my debts?
That's a really good question and the answer is important. Bankruptcy laws are on the books to provide a fresh start so that individuals will continue to work hard, take care of their families, and contribute to their communities and society. In the long run, this philosophy saves tax payer money because self-sufficient peoples don't rely on governmental services.
In Dickensonian England, debtors were put in debtor prisons. This policy was totally counterproductive because if you're in prison, you can't pay back any debt or take care of yourself or your family. Learned helplessness results.
Our Founding Fathers saw a better way. They knew that if people were free from insurmountable debt, they would work hard instead of giving up. To guarantee a fresh start for all Americans, they mandated that Congress have the power to enact "uniform Laws on the subject of Bankruptcies throughout the United States" (Article 1, Section 8, Clause 4 of the United States Constitution).
Although it may seem counterintuitive at first, discharging your debts in bankruptcy actually helps society, in the long run.