Well, saving Pakistan from USSR was one narrative, developed at that time to rationalize the meddling of Pakistan in the Afghan war.
However, when someone makes a point, he has to be aware of the counter argument as well.
After the WWII and establishment of UN, it was not possible for any country to attack another and declare it its own piece of land after its military victory. Therefore, was there any substance in the claim that USSR wanted to reach Pakistani hot waters through military invasion?
Secondly, people who know the real history of Pakistan also know that during 1970's, USSR was having good relations with Pakistan. Our only Steel Mill was a gift from USSR. We established a barter trade system with USSR and much of our wheat was imported from USSR at that time.
Having such relations with Pakistan, USSR could easily go into a trade agreement with Pakistan to use its ports, just like China did. It is also our history that one of our political govts "Gifted" the Gawadar port to Sultan Qaboos in exchange of Surrey Palace.
Now to the point of our unnecessary meddling in their internal affairs: Ok, even if I take your point of Afghan Jihad to be about saving Pakistan, then what was our responsibility after the war was over?
The reality is that we kept supporting some groups within Afghanistan after the USSR retreat and called those groups our "strategic assets". Do you know that during the 10 year war with USSR, Kabul was still intact, but after USSR left, the whole city was ruined due to the more ferocious civil war that followed Russian withdrawal. More people died in that civil war. Now, if one says that Pakistan was not a party into that.... is something moronically forged without even an iota of sensible logic and knowledge.