The Taliban have been working with and protecting al Qaeda in Afghanistan.
Only problem is that the Afghans didn't attack us. Saudis did.
Only problem is the Saudis who attacked us were headquartered in Afghanistan with the Afghanistani government protecting them.
The Taliban were funded by OBL and his supporters to the tune of at least $100 million, to impose their rigid interpretation of Islam upon the country, and to train a multinational core of al Qaeda members, some of which stayed in Afghanistan (the "Arab" Afghanis) and some of which went back to their countries of origin or other countries from which they could plan, and in some cases, unleash their terrorism across the world.
The relationship between OBL & al Qaeda and the Taliban was symbiotic.