Why did some developed countries target afghanistan and iraq while the main terrorist base was pakistan?
You must be talking about America. First reason to attack gulf countries like Iraq is huge OIL RESERVES. As America is biggest oil consuming country and Pakistan has none of it. Second Reason is because of India I think. As India and China are competitors to America and India’s biggest enemy is Pakistan, America is just playing game with rule “Enemy’s Enemy is our friend.” By this rule America was providing funds to Pakistan to purchase weapons and also selling it to Pakistan. But now America also started to attack some parts of Pakistan by Drone Attacks as they know that next target of terrorists in Pakistan is America itself.