With limited resources, you have to prioritize or else you can run the risk of being spread so thin nothing is adequately funded so nothing really gets accomplished. You can't fight a war on all fronts, all the time.
I mean, defense contractors look at hot wars as opportunities as well. And they do drive technology forward, perhaps even more than any other force in this discussion. But that's not to say they don't have negative externalities that shouldn't be ignored.
I probably didn't do a good job of explaining that I meant "constrained environment" in the operations research sense. Everything rooted in the real world is constrained. Why don't we each take a private jet to work everyday? Because we're constrained on money. If we're not constrained on money, we're constrained on time. If it's not that, we're constrained by the amount of carbon we can release and still have a reasonably favorable environment for humans.
One of the reasons the Space Shuttle became somewhat of a boondoggle was because of this. They had a constrained budget but had to meet the demands of multiple, often competing, stakeholders. Musk knows this; he knows that NASA has constraints he doesn't. He doesn't have to spread his facilities across multiple States to help ensure support from as many Congress people as possible. He doesn't have to expose himself to the same level of political risk that can change every four years. He can optimize under a different set of constraints, but it would be a mistake to assume he's unconstrained.