It's an established and obvious point, a corollary to the famous post-Watergate principle that "it's always the cover-up, never the crime." The "crime" might initially seem serious, or at least embarrassing: sending the Watergate burglars to spy on Richard Nixon's Democratic opponents, whatever happened between Bill Clinton and Paula Jones or Monica Lewinsky. But of course what came after is what did the real damage.
So too in the world of terrorism. Attacks can be terribly destructive, as we saw in hideous form 12 years ago. But the long-term threat to national interests and values comes from the response they evoke. In the case of 9/11: The attack was disastrous, but in every measurable way the rash, foolish, and unjustified decision to retaliate by invading Iraq hurt America in more lasting ways. I make that case here, here, here.
Barack Obama seemed to recognize that as early as 2002, in arguing against the invasion of Iraq; and through his 2008 campaign against Hillary Clinton based on her misjudgment in supporting the Iraq war; and in 2013 in saying that it was at last time to conclude the otherwise open-ended "Global War on Terror."