This is a flamewar comment that is bad for HN, that indeed set off a wretched flamewar like clockwork (bomb-timer clockwork). Threads like this are not welcome here, so please don't post such stuff again.
There's also a question of intellectual maturity. Consider that Noam Chomsky has spoken many times about good things that were done with DoD funding, as well as about how no one can rightly condemn others for not being in a pristine moral position because no such position exists (pointing to his own career at MIT as an example). If the deepest and most trenchant critic of American militarism understands this, I think internet commenters who fancy themselves critics of American militarism can be expected to understand it too, at least in this corner of the internet. If you want to condemn others or blare with ideological megaphones, please do so elsewhere.
As terrible as each of those things were, his point largely stands. Most things labeled 'terrorism' are better handled by police/. Obviously the stupidly large mountain of money the US gov spends on 'defense' didn't save people from those. A country's defense budget is really for defending itself from invasion, and our risk of that is low. The last meaningful example anyone can give is pearl harbor - which was 80 years ago in a pre nuclear world.
You don't need to spend more than most of the rest of the planet on the military to defend an area of land that's a tiny proportion of the world's surface. Are you sure you've been paying attention to US foreign policy over the last hundred years?