Government spending isn’t necessary for economic growth but it certainly can help jump the economy during times of weak demand.
And in good times spending levels should be cut back.
That’s Keyensian economics which as been thouroughly discredited. “Prime the pump” they love to say.