NASA is of incredible cultural, scientific and technological value, with many positive externalities and spin-off which benefit the USA and civilisation in general.
Yet, no corporation could do what NASA does. The long-term research programmes and the levels of investment required with no return of investment in sight, is not something private capital does, regardless of the positive externalities (which are irrelevant to their interests anyway) and actual value it produces.
Capitalism developed, in part, because it allowed for large scale investment in large capital projects, like building factories, railroads, canals, etc. But, it does these things only with the expectation of a return on investment and eventual profitability—even if, and often quite typically, the externalities are negative (pollution, addiction of consumers, death and maiming of workers, destruction of ecosystems, depletion of resources, etc.)
When it comes to the really, really big capital projects, with no return of investment likely for an entire generation or more (like space exploration) then only the state sector can do that, because the state cannot go bankrupt or run out of money, and does not need to return a profit.
As for “free-market” capitalism. There’s no such thing. Never has been, and never can be. It is little more than an idealisation that cannot exist in practice. Capitalism exists because of the state. The propertarian system that allows for a class monopoly over the means of production, is a product of state, and required state coercion on a massive scale to implement.
And you are correct. Corporations can and do bribe the government. This is exactly because of the historical development of capitalism and the modern state. The two are in a symbiotic relationship. The state protects the propertarian system upon which capitalism is based, and private capital attempts to buy control of government (the administrative arm of the state) to gain favours from the state. In short, real capitalism has always been “crony” capitalism.