I don't think the deaths are the most important thing; rather, it's the absences:
• Presume that a job market contains people with job-skills, and people without (i.e. "lemons").
• Presume that businesses function better when they can select from a talent pool with fewer lemons; and that lemons in a job market create "noise" in the hiring process that cause openings to go unfilled for longer.
• Now, presume either a draft (which doesn't care about job-skills, but does care about age, tending to select for younger people with fewer job-skills), or simply a military with lower job-skill requirements for entry than most occupations.
Thus, a military on a war footing will selectively withdraw more lemons than non-lemons from the job market, leaving it full of higher-quality candidates, making the businesses in that market more efficient.
For this hypothesis to be accurate, the same thing would have to happen if we just gave all the people being sent to war public-sector jobs (or Basic Income) instead. Though that would perhaps work better than a war for stimulating the economy: people remaining in the country would be spreading their demand across the market, rather than consuming goods exclusively from the military's line-of-supply contractors.