Whether we like to admit this or not if Pakistan was not there then the area would have pacified long ago. The very reason why there is terrorism in this region is quite simply because of elements in Pakistan. If the safe havens were not there most of the fighters would have been killed or given up.
Why would the greedy generals and the ISI leaders be bothered about thousands of bottom of the hierarchy soldiers dying? They can easily be replaced.