That core problem is misalignment of incentives. Or in short, politics. When you've got a public budget and your goals are political ones, you're going to pursue a specific set of capabilities and policies that help your political career. This is true from the President all the way down to the lowest level of managers at NASA. I think the real cost, and thus tragedy, of this era is the thousands upon thousands of good engineers who were sucked up into NASA because they believed in the dream of human space flight, and were never able to accomplish much over the courses of their careers.
The solution to this problem is very simple: No government agency with control over space. Outsource everything. If government wants to fund scientific research or exploration, great- give grants to institutions that then have effectively complete autonomy. For instance, JPL, could be a separate institute with little connection to government other than primarily getting its funding from the government. If politicians want to send a probe to Mars, let JPL be the master contractor, where JPL hires the scientists, while subcontracting out the design, development and production to private entities.
SpaceX is much more efficient getting to space, cost wise and reliability wise (I believe) than NASA ever has been, and they are using (IIRC) a discarded russian design, off the shelf as the basis for their system (though certainly they've done a lot of engineering work.)
The commercial space industry in the USA has suffered under the government control over all things space since the beginning. I remember when Richard Branson-- the founder of Virgin Galactic, and the one who funded the design and development of SpaceShipTwo was prevented from seeing the design he'd paid for because he was a british national!
In fact, I'm certain that the only reason Burt Rutan and Virgin Galactic were successful is that their "launch" requires only a runway, and thus they can easily do it from just about any country. Previously, NASA and the FAA has made it very difficult for private entities to pursue space access, by denying them the necessary permits to do testing.
After the X prize was won, when commercial operation plans were announced, there was a flurry of congressional noise about regulating the space industry ("for safety" of course.) I think the only reason that died down is that there is literally nothing stopping Virgin Galactic from flying off and launching from a newly crated "space port" in, say, Panama. (Well, except that the government apparently considers their designs "National Security Secrets".)
It is time to dismantle NASA. Let the capitalists pursue profit in space, and government can get whatever it needs launched (or built) by the same contractors under whatever terms the government wants-- but at much lower costs.