As a strategic matter, during wartime, the economic output of the entire country can be redirected to war efforts.
Relative economic output of different forces is a major determining factor in war outcomes.
The percentage of GDP during peace-time serves as an indicator of readiness for war.
It is worth noting that Sweden staved off the USSR during the cold war with this very cleverly designed tank: https://www.youtube.com/watch?v=bSNNNMYmTKQ
You probably mean the cold war, not ww2? Sweden didn’t (directly) fight the USSR during ww2, and was famously unprepared at the start of the war.
> As a strategic matter, during wartime, the economic output of the entire country can be redirected to war efforts.
GDP can also be changed via policy.
And your suggestion has Laffer curve problems. Redirecting the entire output of the country into a war effort will sharply reduce the output of the country.
Because that’s how NATO defines it, such that each member makes a proportional contribution. It would be silly to expect say Estonia to match Germany in real terms, but it’s reasonable to expect Germany to match say Poland in relative terms.
(Yes I know Sweden is not a NATO member but most European countries are so it makes sense to compare like with like)