Intelligence agencies are often blamed when the use of military force has an unexpected or negative outcome. Pundits often argue leaders end up in difficult situations because they are not fully informed, or intelligence agencies got it wrong.
Of course, analysis is sometimes wrong. Intelligence failures do happen and can lead to bad decisions and disastrous outcomes. When intelligence agencies fail, as they did before 9/11, the price is steep. But, more often than not, intelligence analysis is very good.
Perceived failures are far more likely when political leaders manipulate, ignore or even revise intelligence findings for their own purposes.