US used to help out Pakistan not because they favored Pakistan as a nation. US (and everybody) knows that Pakistan has enmity with India. US just made use of that to create and maintain pressure on India as they felt India had the potential to rise as a big economy and that time India was friends with then USSR. But the scenario is changing and India has come closer to US these days. And that is why Pakistan is now trying to be friends with China.