There's more nuance to these issues that you suggest. The U.S. government is investing in tech for various legitimate strategic reasons you can read about. Government bureaucracies historically fail to produce (or contract) good products for reasons you can observe by working at one (or by reading Dilbert). Many tertiary sector businesses are indeed just middlemen but still create value in a more complex way.
I get it that tech can be criticized in the way you're doing it. This discussion had been had thousands of times on this site. I have nothing to contribute besides what I already said, and even all of that had probably been said thousands of times as well.