Money seems to be an excellent motivator, but when death is on the line people seem to embrace a little more out of the box thinking. Rent seeking and collusion to avoid innovation seem to be problems with both the money and violence types of power.
If that's too last-century for you, you can look forward to the benefits of DARPA funding the development of the basic tech and Open Source software that's driving the rapid development of robots right now.
Useful side effects for sure, but even if you took away the direct non-financial costs of the military (non-zero chance of nuclear armageddon...), I think there are things we as a species could work on which would produce the same kind of competitive, focused effort. The "space race" accomplished a lot, and consumer IT tech (say, mobile phones) has progressed even faster than military tech (outside maybe an existential war like WW2).
I don't disagree with your wider point that their are other useful motivators out there but it's worth noting that the space race was militarily motivated. Sputnik flying overhead effectively showed the soviets had/would have the ability to drop bombs anywhere in the world. Even the space shuttle was influenced in design by militaristic influence.
Money seems to be an excellent motivator, but when death is on the line people seem to embrace a little more out of the box thinking. Rent seeking and collusion to avoid innovation seem to be problems with both the money and violence types of power.