It is true that democracy is a recent experiment in Afghanistan. The 2004 elections were partially successful, and some kind of Government has been maintained, albeit with the US and NATOs help.
The Taleban were born from the Mujahideen who the US supported against the Russians. Afghanistan was literally invaded at our invitation by every foreign holy fighter will was willing to repel the country. After the Russians left, the foreigners did not go away, the west abandoned them, and they turned against us.
Our invasion was to fight a proxy war in Afghanistan, largely one group of foreigners fighting another group of foreigners. The average Afghan just wants his country back, and a stable elected Government is the best option to achieve that. It is also the best option for us, because we can leave when that happens.