Pakistan was carved out of India on the basis of the two-nation theory in 1947. The theory collapsed in 1971 when the Bengali-speaking part of the Muslim nation broke away and formed Bangladesh. However, the Pakistan army remained obsessed with India and in 1954 joined the #military pacts sponsored by the USA. The purpose of the pacts like the Baghdad Pact and SEATO was to contain Soviet Russia but Pakistan joined with the idea of bolstering its military with weapons and training from the USA for use against India.
US military help
For the last 6 decades, the USA has supplied the latest aircraft, tanks, and other weaponry to the Pakistan army. There has been a tapering off for the last few years as the USA realized that Pakistan played the two-faced game and supported organizations like the Afghan Taliban (Haqqani faction) against legitimate interests of America. It also gave a safe haven to Osama bin Laden until he was killed in a US commando raid.
The USA, apart from giving the latest fighters and tanks, also sent its advisors to train the Pakistan military. Unfortunately, the entire weaponry and training have not borne results and the Pakistani army has generally put in a poor performance. It started with the 1965 #war with India, when the Pakistani army launched its vaunted Patton tanks with IR, but the operation failed. Again in 1971, the army lost the war and 100,000 soldiers surrendered to the Indian army. It also established a dubious record of being the only army in the world to have lost half its territory in a war in the 20th century.
The situation has not improved and in both the 1998 Kargil conflict and the present battle against Muslim extremists in the NW Frontier, the army has nothing to show.
The Pakistan army was a secular outfit when it divided from India as it was part of the British Indian army. But Pakistan opted for a Muslim state and the army also got infiltrated with rabid sectarian ideas. This has affected training and the professional ethos has also been frittered away. Fighting professionally is given a go-by as army generals look after business interests and political power. The net result is a fighting force that is not professional and has over the last 7 decades lost all the wars and half the country. In effect, the pumping of billions of dollars of military aid and training by the USA has not borne fruit.