Countries don't wage war, Governments do.
GDP is the economic production of a country, which is usually much larger than what the government has as available annual income. Historically government expenditure in the US has amounted to ~20% of GDP since 1940 (and was lower than that previously). (Source)
In general, if a government needs to spend more on a war effort, it has three options: print money, which is going to inflate the money supply and might work for a very short time period but will backfire quickly, raise taxation (which may not be possible once taxes get to a certain point, and the US did do this over the course of WWII) but once you reach a certain point, taxation will slow your production down, at that point you'd have to seize assets from the private sector (which obviously wouldn't go down well in the US). Lastly, the government could go into debt.
To answer the second part of your question, since we know that the US was spending 38% of GDP but was only raising 18% of GDP in taxes (and if you look at the graph it's probably safe to say that it was raising an average of 12-15% over the course of the war) that means there's somewhere in the ballpark of 26-20% of GDP worth of money that has to come from somewhere. Since printing more money isn't going to work, realistically the US government would have had to triple taxes from 1930 levels to pay for the war without going into debt, or it would have had to drop the size of it's military by two-thirds, or some combination thereof, say double taxes and half the size of it's military.
This also leads to some problems: if we had to half the size of the US military, would the allies have been able to win the war? Keeping a balanced budget as a priority over that of winning the war doesn't seem like a wise course of action.
Any increase in taxes would also have a dampening effect on the economy itself, (and would also indirectly increase the costs of some of the purchases that the U.S. government would be making), so while the government might get more revenue this way it might end up with a less cost-effective military.
If the government wanted to avoid that, it could just seize assets from the private sector-- if it just stole from multimillionaires, the rail and coal tycoons etc. it probably would be able to finance the expansion without too many short-term effects, but I doubt it would ever have been a politically viable option. Also, arbitrary seizure of private property is generally a bad thing if you want an economy to run well.
So all of this kind of argues for taking on debt.
Of the three choices going into debt is more palatable for most people. It has the advantage of taking wealth from citizens NOW with the promise of them getting money later, when the government desperately needs money now (to win the war) and couldn't care less about how it will pay the citizens back later.