the same way it mucked up:
-railroads linking the country
-the interstate that provided the backbone for industry, so that suppliers no longer had to be next door to factories (which creates a dynamic where every town is its own industrial enclave), but could supply the entire nation
-the telephone network allowing instantaneous real time voice communication across the country, where before moving from coast to coast typically meant leaving all your family and friends behind essentially forever, other than a couple letters a year
-creating a currency that fuels and backs our economy
-creating the rules and regulations that permit businesses to operate in a predictable and profitable manner, along with legal protections for everyone and everything involved (company, employer, employee, consumer, copyright, trademarks, business practices)
-safe food that doesn't require finding out a supplier is bad by having people die first
-safe cars that don't require finding out a supplier is bad by having people die first
-safe homes and buildings (the building code) that doesn't require finding out a construction company is bad by having people die first
-safe (lots of things) that don't require having people die first
-a military that ensures the nation is secure from outside threats, rather than having every city state or town see to its own defense, or worse have it provided by rival companies ala The Syndicate (also acts as a unifying force, otherwise cities/states essentially act as their own nation states)
-public health, particularly including vaccinations
The list goes on.
But the point is this: to say government always mucks it up is ignorant. No, government isn't perfect. But in our nation, and other free nations like us, if its not perfect we are able to fix it, and more importantly, fix it without resorting to violence and revolution, which is good for stability and long term growth as a society. And it's because we follow the political theory of a government "by the People, for the People, and of the People". Our government is US, we are the government, represented in the abstract by the representatives we send to D.C. And because of that, our government is more successful than not, and more adequately addresses problems that we as society see than other governmental systems that have come before. Our government is not some abstract Other, separate from us, and unaccountable to us, regardless of the hyperbole you may be told by people and groups who WANT YOU to think that you are powerless. They want you to think that government is a failure, that it is out of control....so that they can control it more than you.
Ask yourself, why do people fight so hard to get into office in an entity that they not only claim is not only a failure, but also evil, and the source of all problems?
And further, why do they try so hard to MAKE it fail, to make their claims come true?
The answer is because it's a sham. They want you to think those things, so that you stop caring, or stop trying, and cede control to them.
--
If you ever spend time in the military, you find lots of seemingly braindead warnings and procedures. Things like "caution jet blast", caution tape around bulkheads, particulary the top and bottom, signs near ladders saying "watch step", or "hold handrails". You may think these things are dumb, but going through training you will learn, each of these warning exist because someone, somewhere didn't pay attention, got hurt, screwed up, or hurt others. Someone fell down that ladderwell; someone got sucked into a jet engine; someone cracked his head open going through a hatch, someone knocked someone overboard.
Government action is very similar: Government and a lot of the functions it has taken on, or regulations it has made, like say in areas of food and car safety, or manufacturing pollution, exist specifically because someone, somewhere, took advantage of society before those rules exist. Companies know how much a life is worth, and compare it to how much it costs to make a better/safer product, and without regulations to force their hand they can, will, and HAVE in the past made decisions that directly result in death or injury. They know how much they can get away with before it hurts profits more than providing a better/safer product, or better/safer workplace.
There is a very educational website which provides a good refresher course on basic civics and the role of government, and basic US history as to why we got to where we are today in society and governments place in that society. This is important knowledge, but knowledge that is seldom taught anymore in schools. And this ignoring is directly feeding some current political movements.
Two good articles to start with that are related to your specific claim ("they always screw up") are Why Government Becomes the Scapegoat and The Forgotten Achievements of Government.