The government recognizes that people do not spend money and pay taxes when they are drowning in debt. That is bad for the government. The government needs taxes and the economy needs people to spend money. When people spend money, they keep factories and businesses humming. When factories and businesses are busy, they hire more people. When more people get hired, they spend money on cars, houses, and goods and services. If you are buried so far under your debts that you have no money left over the buy things, the economy grinds to a halt.
The government wants to provide a safety valve in the economy so that people can get back to doing what it wants them to do: paying taxes, spending money, and re-entering the stream of commerce.
As with anything, it’s all about balance. There are various rules within bankruptcy law that protect creditors against fraud and ensure that the people filing bankruptcy qualify to do so. There are also many kinds of bankruptcy to ensure there are options that best fit the need. Creditors receive tax breaks on debt that is wiped out and there are many other things in place to ensure proper balance for a successful economy and most importantly, the preservation of the family!