You are changing your parameters. Now you are introducing the fuzzy concept of 'enmity'. Other than their problems with India, I don't think Pakistan has enmity with either Afghanistan or Iran. With China, they have an almost satellite relationship. You should keep searching for a better theory. Central role of military may be a good start. Extreme involvement in the affairs of Afghanistan may be another. Lack of good leaders is certainly an issue. The reasons are more pedestrian than peculiar. For that matter, Myanmar, Nepal or Sri Lanka are no great shakes either.