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.