that trillion estimate, one of the lower ones by the way, is a cost figure without the associated profits and revenue. As horrible as it is and was, the 'military industrial complex', as a whole, profited incredibly -- this 'trickled down', a phrase I hate to use , all across the United States in the form of jobs from market players and call-for-bids across the nation to fill in niche topics (like airport security, for example) that were otherwise un-worked beforehand.
Another aside : the proof that airport security has changed anything for the better is scant at best, and corrupt at worst.
tl;dr : if you think any of the wars in the middle east were fought for the sake of 'American Safety', whatever that might be, then you're just not paying enough attention.