Earlier quoted context omitted.
https://steveblank.com/secret-history/ The military spends on R&D where it makes zero business sense for a for-profit company to spend. Private companies must be profitable.
Still, the question remains: Can we say a priori that the funds for R&D military spending wouldn't have been spent better by the private sector?
The private sector is generally very, very heavy on short-termism. Even when companies do have internal long-term research initiatives, there is often a strong aversion to pursuing research that could cannibalize high-margin products.