But remember that developments from the military will filter down to the 'real world' surprisingly quickly and improve the world in ways not thought of while creating it.
Take Radar- used to track the Germans during the Battle of Britain. Without radar, civil aviation wouldn't have become anywhere near so safe or simple.
Or Submarines- used to launch sneak attacks. That same technology- and the tech developed to find them- created the foundations for the tech that criss-crosses over the North Sea bed to extract oil.
None of these would have had immediately-obvious peacetime applications at the time. So what about the ability to sense people inside buildings, or have your strength augmented? Both of those have applications in the real world, and they're both DARPA projects.
How about Jet fuel from nuclear power/seawater/atmospheric CO2? Yeah, it fuels their F-22 death machines. But it could ALSO be used to make artificial, carbon-neutral petrol.
On the same tac, if the Atomic Bomb hadn't been developed we wouldn't have relatively-safe, low-carbon, tiny-waste-volume nuclear power. This was developed into power sources for submarines- so without it our nuclear deterrents wouldn't be as effective, increasing the chance of war- and we wouldn't have the big-ass Icebreakers that keep remote shipping routes open.
How about processing and transmission of lots of information? While not exclusively a military problem (and predating DARPA being called DARPA), it did lead to the creation of the ARPANet, and from there the Internet.
Even the act of war itself- having a war during this time of EEGs and powerful microcomptuting systems has lead to the demand that's driven the funding for some phenomenal leaps in prosthetics technology.
So no, war isn't a pleasant thing. But as long as we keep pushing forwards we lower the number of injuries on both sides and the things that are developed bring incredible- and unexpected- rewards to the civillian world.