The biggest problem I've always had with NASA, especially since Apollo 11 landed on the Moon, is that they put their "eggs in one basket and then guarded that basket to Hell and back"

When they (or Congress) scrapped the Apollo program and went with the Space Shuttle, that's all that NASA had. I look at the Navy and they don't just sail destroyers. They've got cruisers, and submarines, and air craft carriers. The army just doesn't maneuver with tanks. They also have Hummers, and APCs, and Jeeps. Each different vehicle (or water craft) does a variety of jobs as necessary. Why did NASA not continue with the Apollo space craft as an adjunct to the Shuttle. Then develop several other varied types of space craft for both near Earth orbit as well as Lunar observation and landing craft with the potential to develop a Mars reconnaissance and/or lander decades before craft of this nature are even currently on the drawing boards! Of course, there is that one, small, minor consideration that Congress in their infinite and omnipotent wisdom simply refused to give NASA any money
The comparison to the Navy is weak; space exploration is still about at the stage back when ships were all built the same, regardless of their function. It took the Age of Exploration and the resulting astronomical growth in merchant shipping, and the related expansion of naval functions to protect commerce, to spawn a whole range of ship designs: instead of just big platforms to put weapons on in order to sink the enemy's big platforms with weapons on them, they needed ships for scouting, ships for "cruising" (not meant for battle, but able to fight if they had to), ships for fleet supply (like merchant ships, but faster and stronger), etc., while merchant shipping also diversified.
But your point about Apollo is a good one. The reason, though, was politics, which restricted budgets enough that they could either continue with going to the moon or develop serious orbital capabilities, but not both. It would have been better to modify Apollo to start leaving equipment on the moon aimed at building a base while developing the shuttle and starting a space station, but we got what we got. Congress strangled things, which showed a great lack of vision.
At this point, though, we've got capabilities that will let us build a moon base a lot more safely: we should soon be able to send robots able to excavate and set up basic shelter on the moon without needing to send humans, so when we send crews they'll have facilities waiting for them. And again, that's a place where government may turn out having to lead, because unless we lose all the greedy plutocrats with no concept of anything but further enriching themselves and get more visionaries like Musk --
lots more -- no one else is going to be able to afford it.
Unfortunately the US made a stupid turn into unbalanced budgets, thanks to the GOP, crippling the country's ability to lead. Though as I've pointed out before, NASA could end up being a solution to that, if Congress would stop putting politics before country: just one NiFe asteroid hauled back to earth orbit could pay off half the national debt -- so that's where we should be focused. If corporations get there first, we'll be stuck with the debt and its consequences; if NASA gets there first, the debt could be paid off and then the infrastructure spun into a corporation with every American getting shares... since we the taxpayers would have paid for it all.