when you say things like "Afghanistan" is Pakistan's backyard, than it makes it hard for me to believe that. how much larger is Pakistan? India is 7× larger but I doubt any Indian can guy Pakistan is it's "backyard". Large countries like China and USA talk like that about Vietnam and Mexico like the respectively. you don't have to be an empire to be have imperialist tendencies.
well, it was for your own interests. and this little adventure with the help of imperialist USA (which had been and was on many other anti-Soviet trips like that) led to a chaotic civil war in Afghanistan ending with a pro-Pakistan regime in Kabul. and then came the WoT when Pakistan again for it's own self interests let America go into Afghanistan once again and **** it up. and then it continued to fund Taliban prolonging the war, for it's own interest.
Everything Pakistan did was for it's own interests, at the detriment of Afghan interests.