Al-Qaeda supports both the Afghan Taliban, who are Pakistan’s allies, and the Pakistani Taliban, who are Pakistan’s enemies. With the Afghan Taliban Al-Qaeda fights the Americans in Afghanistan, and the enemies of the Pashtuns, and with the Pakistani Taliban Al-Qaeda fights the Americans in Pakistan, and the Pakistani security forces, the Punjabies, when Pakistan attacks the Al-Qaeda to please the Americans.
The Afghan Taliban do not approve the Pakistani Taliban attacks on Pakistan, but they have to accept these practices, because the need the Pakistani Taliban. When the Americans, or other local enemies of the Afghan Taliban, hunt them in Afghanistan, they cross the border and the Pakistani Taliban give them refuge.
The Afghan and Pakistani Taliban have different causes, but they both cooperate with Al-Qaeda, and sometimes they help each other and sometimes they fight each other. They are narcoterrorists.
Another problem that Pakistan faces when it comes to terrorism is that when it attacks the Afghan Taliban, to please the Americans who are attacked by the Afghan Taliban, the Afghan Taliban are infuriated, and there are the conditions for a coordination between the Afghan and the Pakistani Taliban against Pakistan (Punjabis). Or there are the conditions for greater cooperation between the Afghan Taliban and Iran.
Therefore when Pakistan attacks Al-Qaeda, Al-Qaeda attacks Pakistan with the Pakistani Taliban, and when Pakistan attacks the Afghan Taliban, there is the risk of a cooperation between the Afghan and the Pakistani Taliban against Pakistan, and of a greater cooperation between Iran and the Afghan Taliban.
I have to say that it is not only Al-Qaeda that has influence over the Pakistani Taliban. The enemies of Pakistan in Afhganistan also have influence over some gangs of the Pakistani Taliban. I guess other enemies of Pakistan must have influence over the Pakistani Taliban.
See also “The 2 Faces of the Taliban”
“The Paradox of Afghanistan”
“Who are the Pakistani Taliban?”