Afghans has anti-Pak policy since the era of Dawood. This policy remains intact, even Islamic/religious/jehadi or any other form of govt comes into power. They will never make peace with Pakistan. In every foreign forum, Afghan claims a massive part of Pakistan as Afghan territory. They will never never never make peace with Pakistan. Only deal with lead. There is no solution, our govt and military tried all solutions...and it's back to square ONE.
When the public of Pakistan accepted the Afghans, Uzbeks, Chechens, Tajiks, etc and allowed them to settle in FATA and got their women married with them, then why blame Afghans. In meantime, weapons flowed freely into FATA thus into Pakistan since 1980s. How can TTP build factories and weapon depots inside Pakistan otherwise.
And its not only FATA, same amount of ammunition, weapons, resources, transport, etc is available for TTP and BLA inside Baluchistan which is another bomb waiting to explode when time comes, much bloodier than FATA. In KPK, GOP messed up with FATA since 1947, not bringing it under Govt writ, but with Baluchistan even after 1970s insurgency GOP didn't give attention to the province.
Look at all the insurgencies in KPK and Baluchistan since 1947 - Army was called, it cleared up the area but what happened then ? Pick up any year in 1950s, or 1970s or after that in 2000s. The issue remained in between after Army completed its job and the time for handover arrived.
I can write on movement of RAW into Pakistan from border of Sindh to Baluchistan, from Iran to Baluchistan and from Afghanistan to both Baluchistan and KPK, but again bear in mind that it didnt just occur in early 2000s or in 2010s or 2020s, it started much before that, it got quelled down in between but gained momentum again.
How did the movement occur when Pakistan Army is looking after borders ?
Pakistan Army is not looking after borders. Rangers look after Punjab and Sindh borders while FC looks after Baluchistan and KPK borders with established posts. After that the pickets and check posts are manned by Police, not Army.
Were Intelligence agencies sleeping ?
No, in many instances the infiltration and exfiltration was monitored both by ISI and RAW, while some methods were used by both agencies which were caught by either one. Smuggling was rampant through Sindh and Baluchistan borders for all three countries (India/Pakistan/Iran). The agents were caught eventually but at times the damage had already been done. Further damage was avoided after that. It was easier to catch Pakistanis working for Indian agencies inside cantonments because MI and FIU were fully active there. FIA, IB and ISI were covering other cities and regions.
There were many instances where Army jawans, Rangers, FC and BSF of both Indian and Pakistani Armies were caught providing intelligence to other country and sometimes working as double agents. Army officers (Pakistani/Indian) deputed in regions close to borders were caught working against national interests. However, this doesn't leave out members of public (traders and businessmen) and Government (customs and police) facilitating the whole process when Intel agencies sweeped through the whole ring. The smugglers/dacoits in Sindh had the same training level of an Indian Army soldier or agent, which is now seen in TTP terrorists. Sindh police was normally no match against these smugglers or dacoits for this reason, well one of the reasons eventually. And since we are talking about Sindh, do you know why was Panoaqil cantonment built outside Sukkur as a completely different setup when it was much cheaper to built inside or attached with Sukkur like Hyderabad or Karachi ? The Sindh separatists Sindhu-desh and related movements, the rural public emotions siding with daciots/smugglers whom they thought dont get jobs so have to resort to such professions, political ambitions of PPP related leaders and the Army Vs wadera hold that the boys of villages will join Army rather than stay as slaves. Eventually Army said its a strategic point to house an infantry division, where as Hyderabad Cantt cannot hold two or more divisions.
The people of interest for both ISI and RAW were pakistanis/indians having relatives on both sides of the border, the urdu speaking community and the muhajirs. For sake of visa, visa extensions, money, privilege's and blackmailing, citizens of both countries were forced into spying at certain occasions. Its is commonly thought that MQM was built up from ground to stand against PPP, that is not the only reason. MQM worked both for ISI and RAW against India and Pakistan at times due to its members travelling frequently in both countries.