You seem quite young to remember Musharraf era, so let me tell you what happened.
After 9/11 India had dropped down their pants and bent over backwards to host USA against Pakistan.
Pakistan had two options , either make some ugly alliance or get attacked by USA+ India holding hands together .
USA had no demands from Pakistan, they wanted a face saving from Afghanistan by asking the Talibunnies to handover OBL .
Musharraf sent many envoys to Kabul literally begging Talibunnies to handover just one man OBL to USA and have a war and bloodshed evaded.
The Charas heads refused and basically gave the middle finger to the USA, and then expected Pakistan to save them by Pakistan blocking US attacks on Afghanistan.
Musharraf found no reason to put Pakistan and Pakistani military in harms way for the sake of a stupid knuckle head Afghanistan, who knew no diplomacy .
So i find it very justified that he allowed USA to use Pakistani air space , land routes and a few air bases against Afghanistan.
I did not want to die for the AFghanis, and possibly you would not either.