The era ushered in by 9/11 made theological terms like Sunni, Shiite, jihad, sharia, and Salafi household words, and birthed a nation of armchair experts on the intricacies of Islamic sectarianism and doctrine. Pretense to expertise is a privilege of living in a free country. Oddly, however, the U.S. government has adopted the same facile analysis of regional and religious dynamics in the Middle East and South Asia, viz. the trope that Shiite Iran is a natural enemy to the Sunni Taliban in Afghanistan. This is, in short, rubbish.
The Taliban victory in Afghanistan is a gift to Iran, nothing less.
On its face, the Wikipedia version of Islam might seem to validate the whole “enemy of my enemy” trope. Doctrinally, orthodox Salafi Muslims like the Taliban believe that Shiism (and the majority of Iranians are Shiites) is apostasy. Sunnis, who make up the majority of Muslims, and model themselves nominally on the behavior of the Prophet Muhammad, don’t credit the Shiites, who believe that Muhammad designated his son-in-law Ali to succeed him. Then there are the Salafis—the Taliban, al-Qaeda, ISIS and others—purist Sunni who embrace the literal Quran. In short, they like the Shiites even less.
In a perfect world, Salafis would demand the Shiites embrace the true path or be eliminated along with other unbelievers. But this is not a perfect world, and both Sunni and Shiite fundamentalists allow for both religious and political expediency in pursuit of a higher goal. In the West, this is called realpolitik. And both the Taliban and the government of the Islamic Republic of Iran are masters of it.