I'll have a go:
obscene profits for arms traders;
industrial activity for the hangers-on;
corraling votes for the wartime polieticians.
Having a large, old inventory of weapons the government maintains can be profitable for the contractor because they can sell support for those systems that no one else can. This support alone can employ hundreds of engineers and bring millions a year to a contractor. You can’t do that if the weapons are all fired.
This is all in service of keeping the government happy. The government, state department specifically, can decide which countries the contractor can export the weapon systems too. The set of countries the government will allow this for will be bigger if there is no conflict the government is involved in.
Defense contracting is a very counter intuitive business.