It seems as if for western analysts, the history of the region, particularly Afghanistan and Pakistan starts from 9/11. They blame Pakistan for the creation of the Taliban. They seem to forget that they are also one of the creators of this monster.
When the Soviets invaded Afghanistan in the early 80s, the Western powers created, swelled and supported the idea of Jihad against the invading infidels in the world's Muslim community for the next decade. In fact, misinterpreted the Islamic terminology Jihad, to put a tough resistance against the Soviets. They created, trained and provided arms and ammunition to the Mujahideen with the help of a military dictator, whose rule was prolonged and protected by them against the wishes of the people of Pakistan.
And after the Soviet withdrawal from Afghanistan, they left the war-torn region just at the mercy of armed Jihadi militias. Pakistan, already with an instable economy, was bearing the burden of the 4 million Afghan refugees left to rot by the Westerners. For the next decade, Pakistan was slapped with sanctions after sanctions while Afghanistan was left to see a bloody internecine war and then the Taliban regime. Hillary Clinton's famous remarks in a Senate hearing "We have to cut what we sow" about this situation tell the whole story.
The Western allies should have used force where it was absolutely necessary and for the other issues they should have used discussion, negotiations. They have failed to give the Afghan people the much desired better life and a hope for a bright future, which the Afghani people desperately needed. The West has failed to use this opportunity to win the hearts and minds of the Afghani people and the Muslim community in general. Currently, most of Afghanistan is unstable, most of the provinces are under the Taliban control and there are no signs of a stable government and government institutions. Now even the Western public is antagonised by this long stretched war and public opinion is vastly against it.