It's hard to judge whether those things truly match the budget spent. After cold war, US shifted their target to economical war, and had been spent resources to industrial spying. It seems this suceeded at least to some extent (maybe more). It is only recent they shifted to target terrorism much, yeah, that 9.11 was a trigger as they couldn't stop the catastrophe despite they were tapping bin Ladin and cooperators and even knew the attack plan.