Shortly after Pakistan gained independence in 1947, Afghanistan crafted a two-fold strategy to destabilize the
frontier regions of Pakistan, in an attempt to take advantage of Pakistan's post-independence instability. Firstly, it strongly aligned itself with Pakistan's rival,
India, and also the
USSR, which later invaded Afghanistan in 1979. Secondly, it politically and financially back secessionist politicians in the
Khyber Pakhtunkhwa in the 1960s. Afghanistan's policies placed a severe strain upon Pakistan–Afghan relations in the 1960s, up until the 1970s, when the movement largely subsided as the population came to thoroughly identify with Pakistan; although, resentment against the
Punjabi elite continued to develop. The Pashtun assimilation into the Pakistani state followed years of rising Pashtun influence in Pakistani politics and the nation's bureaucracy, culminating in
Ayub Khan,
Yahya Khan,
Ishaq Khan– the Pashtuns, being placed as the
presidential leader of Pakistan. The largest nationalist part of the time, the
Awami National Party (ANP), dropped its secessionist agenda and openly embraced the Pakistani state, leaving only the small and relatively insignificant Pakhtunkhwa Millat Party to champion the cause of independence in relation to both Pakistan and Afghanistan. Despite the weaknesses of the early secessionist movement, this period in history continues to negatively influence Pakistani-Afghan relations in the 21st century, in addition to the province's politics.
Bit history of past relations between Pakistan and Afghanistan
https://en.wikipedia.org/wiki/Afghanistan–Pakistan_relations
Its in best interest of Pakistan to have stable Afghanistan. I personally want to see a good relationship between Pakistan and Afghanistan but Afghans pashtun need to get rid of this dream of loy pahstunistan by recognising the durrand line and accepting the border as exist and defined in present and should stop exporting terrorism in Pakistan. Rest we will have no issue with Afghanistan and will have no reason to interfere