One could make the same points about the billions we've spent in Afghanistan and Iraq.
It would have been one thing if we had simply sent our military over there to kill islammofascists, and break their toys, but 'nation-building' while leaving islammunism in place is counterproductive to our interests.
At least US aid to developing countries in Africa and parts of Asia would temporarily buy the loyalties of people there, and perhaps make them more resistant to AQ. Besides, just like the efforts over in Afghanistan and Iraq, the money would go to US companies to provide goods and services, it really would still be shoring up our economy. The question is, do we want to piddle a trillion dollars away on potential friends, or on sworn enemies who have not really been defeated, like the Germans and the Japanese were?