"With defense you'll have to build stuff that works flawlessly." --> I don't really get this point. In what way is the SpaceX approach different and not flawless? There's never been any more reliable rockets than SpaceX's ever?
And you seem to argue that SpaceX has the advantage of economy of scale (reminder: it's a re-usable rocket they're making) and cruise missiles are somehow less economy of scale? Can you elaborate on what you mean here? I would think that the number of missiles produced is at least a few orders of magnitude more than Falcon 9's?
When you build military equipment, you have to build them to last for decades. 40-50 years, easily. You'll develop a base model, which will then get forked to the various specs that your customers want/need. Differences could be what launch system they're made for(TEL, jets, ships, etc.), what command and control systems they're going to interface against, and numerous other things. Integration is a huge part of these deliveries.
So instead of designing and manufacturing, say 10000 cruise missiles of exact same type, you're in reality manufacturing 1000 for the US military, 500 for the UK military, 500 for the French military, etc. - with every batch going through different specs, testing phases, etc. And that's after you've won the contract, which in itself can take years to land.
Contracts can of course be cancelled if there are too many issues.
If we're going to use the SpaceX analogy - imagine if SpaceX had to first design a base model, but then fork that to say 10 difference versions because 10 different countries / agencies want to purchase their own rocket, and then spend 10 years on each to ensure that they work perfectly to spec for the 10 different spec sheets you've received.
And if it turns out that the cheap material you used to bring down production costs won't cut it, because it is expected to last 15 years instead of 40, then that's a deal-breaker.
And you seem to argue that SpaceX has the advantage of economy of scale (reminder: it's a re-usable rocket they're making) and cruise missiles are somehow less economy of scale? Can you elaborate on what you mean here? I would think that the number of missiles produced is at least a few orders of magnitude more than Falcon 9's?