This is one of the reasons weapons and technology development overall explodes during wartime. Desperation is the cure for risk aversion.
It's also a reason to be skeptical of a military spending a bunch of money developing technology during peacetime. In reality the expensive stuff they went into the war with is always going to be less effective than the cheap stuff they came out with.
Maybe if you're in a war that actually threatens your country. In the US, the Republican Party wages wars (such as the Iran War) pretty exclusively to facilitate borrowing public money and dumping it into the pockets of the rich. What looks like waste to the taxpayer is a feature to Republicans and their paymasters (including Israel, in the case of the Iran War).