Well you can't expect countries to destroy themselves completely for US ambition and lust for war, each country has a right to look after it's own interest.
Pakistan provided ground support to Nato and US forces, was the main US ally in the region, lost 80 k of it's people in this war, billions to economy, became the main target of terrorist attacks as it was seen as US ally in the region, what more could it have done? Honestly, expecting anything more is just plain selfish but not surprising as loss of life here doesn't really count for west.
Pakistan at present also host nearly 4 million Afghan refugees as a result of soviet and us invasion, they would be a further influx now, but that's okay as long as US and Nato doesn't have to bear the brunt.
Further, it was Pakistan that got US and Taliban to negotiatiate a withdrawal/peace deal. US would never agree to such a deal if they were making gains on the ground. The war was already lost and this deal presented a way out to cut your losses and end this futile war in exchange for assurances of America's safe exit from Afghanistan.
This BBC documentary looks into British and Soviets invasion of Afghanistan, watch it and you would know why US failed