Somewhat cynically, one could observe that the costs of war are transient while the benefits of the spin-off technology are not. The lives saved by the development of airfoils and communications and medicine far outweigh the piles of bodies.
Then again, it is interesting to note that the more absolute the war, it seems, the better the long-term payoff.