Creating them was right at the time. Pakistan needed to end the infighting in Afghanistan and install a pliable government that would give us favourabe trade transit terms. Our previous effort at using an existing Afghan faction (that of Gulbuddin Hekmatyr) went disasterously wrong when he used the weapons we gave him to blast Kabul to pieces and yet failed to win the civil war, and earned us the hatred of the rest of the Afghan factions.
With the existing Afghan factions hating us for our Hekmatyr support, we couldn’t rely on them to be pliable and friendly. The only way we could further our interests in Afghanistan was with a new faction that was dependent on us… enter the Taliban.
That actually went pretty well for us until the Taliban decided that they no longer needed to take orders from us. There was a desperate effort to retain control of them which ultimately failed. At that point continuing to support the Taliban was no longer in our interests as they were not serving us anymore, and continuing support for them would harm Pakistan’s economy and people.