If you have a private firm and you spend a ton of money to pay employees, but what you produce is a flop, there will be no value to GDP. But government spending all gets counted as contributing to economic growth. That's why in the early days of creating these measurements, some people didn't want to count government spending.
We need to have a modicum of faith in people's common sense, creativity and will to survive and prosper even in the face of great difficulties and obstacles. If people could keep society running in the aftermath of the Black Death, they could keep it running after the U.S. government defaulted on its debt.