Iran's allies would testify otherwise though. To them Iran is in fact as loyal an ally as it gets.
From Bosnia's Sunni Muslims, whom Iran has been assisting from as far back as the early 1980's, in particular during the 1992-1996 civil war (which implied being on the opposite side of post-Soviet Russia, a newfound partner); to Syria, which Iran helped prevail in its drawn out war against a powerful NATO- and zionist-backed insurgency; to Palestinian resistance groups, which Iran has kept supplying with arms, funds, training and technological know-how uninterruptedly since 1979, even though some of them at times did not necessarily see eye to eye with Tehran on particular dossiers.
There are several misconceptions here.
The first is that arming Shia Muslims in and by itself does not imply wanting to turn a conflict into a sectarian one. Because by the same logic, one could argue that arming Sunni Muslims is akin to fueling sectarian strife...
And in effect, potential sectarian tensions in present day Afghanistan have nothing to do with Iran, nor have they been caused by Iran. For the past twenty years, Iran has hardly sought to have a major impact on domestic political issues of Afghanistan. Unfortunately Afghanistan has been a fractured society for a long time, and certainly not because of Iran.
But more importantly, there are terrorist groups in Afghanistan which practice acts like this on a regular basis:
Afghanistan’s Hazaras have long been persecuted and over the last 20 years targeted in attacks of increasingly cruelty.
thediplomat.com
Here Shia Muslim schoolgirls, children are being targeted for no other reason that them being of Shia Muslim faith. There was no conflict going on in that particular area of Kabul, there were no armed insurgents or military forces entrenched in buildings next to the school, which was in fact the only target. Nor could it be argued that these civilians were killed for supporting a specific organization or state: they were just random children.
As the article states:
" For much of the last 20 years, the Taliban sporadically kidnapped and beheaded civilian members of the Hazara ethnic group on highways. But with the emergence of the Islamic State in the country in 2015, attacks against the ethnic group took on a systematic shape. Islamist militants blew up two protests, one wedding hall, two educational centers, multiple mosques, multiple political gatherings, one wrestling club, one maternity hospital, and now one school — all in the Dasht-e-Barchi neighborhood. "
So no, sectarian attacks in Afghanistan after 2001 have preceded any reports of Iran arming Shias there. Hence, it's certainly not Iran that wants events to take a sectarian turn. What Iran would be doing, is to help Shia groups protect ordinary Shia Afghan civilians who have been subjected to such attacks for years and are now facing an even more acute threat, that of "I"SIS-K, a grouplet which openly declares its hatred and hostility toward the Shia community as a whole.
Iran would simply be reacting to preexisting, unilateral violence after some 20 years - not instigating anything. And even then, any groups Iran would be arming, will be tasked to go after "I"SIS-K and possible dissident, CIA-backed Taleban factions who with a policy of murdering Shia Muslim civilians out of sectarianist hatred alone. The mission of any such Shia paramilitaries will not consist in responding in kind against their Sunni Muslim brothers.
And that is because the Islamic Republic of Iran is an ideologically pan-Islamic government, not a sectarianist one (hence Iran's support for the armed resistance struggles of Sunni Muslims in Palestine, Bosnia, Iraq with local Sunni Kurds as well as the Sunni Arab units of the PMU, Afghanistan during the Soviet occupation, etc). Assuming otherwise forms therefore a second misconception.
Third misconception: it would be plainly asinine from an Iranian point of view to aim for a "sectarianization" of the conflict in Afghanistan. Simply because Shia Muslims represent no more than 15% of the Afghan population. Right now Iran has excellent relations with various Sunni Muslim Persian-speaking Tajik organizations and movements, and has established contacts with the Taleban as well. A sectarian tainted conflict would cut these partners off from Iran and thus put Tehran at an enormous disadvantage. So once again, Iran can have no interest whatsoever in furthering or instigating sectarianism in Afghanistan.