Pakistan had no other choice.
a) Not side with the US.
The US had already been talking to Indians about basing. Pakistan did not want the narrative to completely swing in India's direction and then not have a say in Afghanistan. Staying engaged with the US allowed Pakistan some room to maneuver, giving in a little, but also gaining a little.
b) US had invaded Afghanistan.
Taliban were operating from our tribal areas. Those Taliban would attack the US troops and run back into Pakistan. US was going to push into Pakistan's tribal areas with ground forces. What was Pakistan to do? Take on the US/ISAF militarily with our troops and see Pakistani cities and infrastructure get destroyed?
c) There was nothing "nearsighted" about Pakistan's policies. It allowed Pakistan to have to balance everything and thus get called out for "running with the hare and hunting with the hounds". This was Musharraf trying to manage the situation so Pakistan would be able to keep its leverage and interests as intact as possible.
d) Most suggestions like yours just end at the wishful "he should not have done it". Game the entire series out and see what great choices Pakistan had. This talk track is similar to how some claim now in all their wisdom "Pakistan should not have gotten involved in the Afghan jihad in 1979".
I happened to be around both times, and none of the choices roughly 30 years apart were that easy.
Afghanistan was gifted to India after 9/11 by colonist/zionist, even after we became US mistress still we were not considered. We guttered down our investment from 80’s afghan jihad when we created a bit of respect in afghans for us from long jealousy post independence. Just compare the era pre afghan jihad and post afghan jihad and Post 9/11. Post afghan jihad to pre 9/11 era was of peace and calm. Colonist wanted to create another kuridish state like rivalry between Muslims here too which they successfully did. Many top generals from Zia, Baig and pre Musharraf era differed from Musharraf siding with US in front of Musharraf and it’s on record.
Musharraf knew, nobody can give him clean chit. He was a failed military strategist.
US released bait ullah mehaud from guantanamo bay prison and brought him to our tribal areas in 2005 to create TTP. These TTP guys killed elders from tribal belt to control the area if any of u remember 2005 era. These TTP thugs are created by US and India just like kurdist.
Evangelical Christian/Jews/Hindus have always been against us and post 9/11 war has been against Islam.
All this was done for a grand strategy to destroy us and control china. India was chosen by west to be the chaudhari of the area. One more gift was given to India. Civil nuclear deal by Bush.
What we got death, economy destroyed, grey list, 2 provinces(half of Pakistan) in anarchy and chaos. If there would not have been china we would have be balkinized by now.
Now there is no way of stopping of advanced weapons to Taliban as US already left the weapons in 2021 and in the cover of left over they will keep supplying them.
Problem is one general policy, we should have gone for institution policy.
We thought post 2021 withdrawal, we will finally be free and in peace but then came CIA chief with a briefcase and tried to dictate Imran khan (Note: dont consider me Imran fan. I am disappointed from him.) but he replied “Absolutely not” and again our Chief sided with US ousted him and made us Ghulam of US again.
Egypt and paksitan story is same. Is chutiya qoum ko generals ke hatho control kro and colonist and Zionist ka ghulam bana ke rkho.
Jab tak pakistani qoum kisi na kisi ke (foreign or local) TATTE uthate rahe gi and will not differ from boss (military junta) opinion tu hum barbad hi hote rahe ge.