
As someone who has experience in government, as well as some knowledge of intelligence operations, I can tell you that hindsight is a great thing to have, when discussing the clues that some untoward event was going to take place. In a government as vast as ours, with responsibilities for intelligence gathering split, by necessity among so many agencies, it amazes me that we figure out anything ahead of time. I liken the problem of predicting adversary actions based on intelligence to solving a jigsaw puzzle, except that you don't have the picture available to guide you and some joker has added thousands of extra pieces to a puzzle of only a few hundred.
Stupid things happen, people are occasionally incompetent, agencies protect their own turf rather than share. All this is human nature as it manifests itself within government. "Never ascribe to malice what can be explained by stupidity" is a good rule of thumb for evaluating a bad situation.