The reason private enterprise couldn’t do the research government entities like NASA do is that private enterprise has to turn a profit quickly or else it fails. Nations can conduct research that benefits not just their military but their civilian projects over the long term.
Why not just do research that benefits only civilian projects and not military ones?
First off, defense of national sovereignty is not an immoral end. We didn’t hear St. John the Baptist telling the soldiers who asked him what they needed to do to quit their jobs, but only to be honest in how they did their jobs and to content with their pay. As Edmund Burke famously put it: “The only thing necessary for the triumph of evil is for good men to do nothing.” If good people never did anything in the military realm, the Hitler-like types would be running the world.
Does anyone really wonder what our taxes would look like if only those bent on domination ever ventured into military matters?
Secondly, knowledge does not exist in neat little baskets marked “war” and “peace.” As others have pointed out, discoveries made in the course of putting a man on the moon had a myriad of unforeseen benefits for the civilian life we live today.
Take satellites. No satellites, no advanced weather forecasting. Without that, how many more lives would be lost in major storms? Satellites are also invaluable in advanced cartography, which is in turn invaluable in every sort of decision-making having to do with the lay of the land.
Thanks to technologies that lead to cell phones and electronic banking, businesses in small hamlets in rural countries can do all their banking via cell phones. They do not have to venture out where the meager profits of their businesses are vulnerable to highwaymen. In other words, technology really does benefit all, from the least to the greatest.
The poorest of the poor aren’t paying for NASA. We are all benefiting from things NASA does. Of course it is our responsibility as voters in a democracy to keep tabs on the ways the government spends tax money. We don’t have the right as voters to tax other people any way we like, even though we arguably have the power to do it. Having said that, I’d argue that our current governmental structure does more for the poorest of the poor than any “hands off” societal structure ever did. Anyone who can point to a nation in which a weak hands-off government lead to better treatment of the poorest citizens is welcome to do so, though.
As for arguing that the United States has unfairly fettered the capacity of its citizens to amass wealth, that seems preposterous to me on the face of it. Anyone who believes that is refusing to admit what a really oppressive government looks like or how extremely comfortable life in the United States is even for those who complain the most about how hard they have it. Tell that to an ancestor who lived 150 or 200 years ago. IMHO, they’d be disgusted at the ingratitude, honestly.