US needed an ally in the region during cold war and Pakistan was such. India became a power by shear size of its economy and US cannot overlook that. If Pakistan had considered US as its enemy, then US would not have been able to enter Pakistan. Today US has enough prfesence in Pakistan & Saudia Arabia to be able to attack the terrorism from inside. One is the training ground and other is the financier. Both are US friends.