How do you instill organizational loyalty in an army if the nation-state you are defending has little legitimacy? Pakistan's answer was to use religion as a bonding agent and a focus on external "Godless" foes. As a result, the Pakistani army, within the ranks at least, doesn't see Taliban groups and their conservative form of the religion as an enemy. They see it as a social movement within which the army could coexist (even approve of). Further, what little legitimacy the army has been able to accrue via religion, would be lost if it undertook a bloody fight to oust the Taliban from their autonomous zones. The Washington Post provides a data point:
...it is hard for the Pakistani military establishment, trained to view Hindu-dominated India as its mortal enemy and inculcated with an Islamist mind-set during the military dictatorship of the 1980s, to accept Muslim insurgents as adversaries. Soldiers home on leave have been taunted for fighting their own people; desertions are rising.