They chose not to nurture enemies. Malaysia at one point was at loggerheads with Indonesia for fueling insurgency during the Malay Crisis. Same with Singapore. Switzerland choose not to take sides during 2nd WW and the cold war.
These choices were made by many nations to focus on their economic growth and social welfare.
Indeed hard choices to make when war drums are being beaten. But those countries that have their priorities straight do make those choices however hard it is to swallow ones national pride and the usual jingoistic rhetoric.
Yes Pakistan has its work cut out for it....maybe due to the peculiar geography, neighbors, and conflicting interests. But it takes great people and leadership to forge out great countries that lead the world, and think beyond today and the traditional roles.
Taking loans to fight a looming war just does not make sense to me for one. We need to equip ourselves with what we can afford and service from a long term perspective and do everything else (Diplomacy, trade, commerce, etc.) to stave off any adventure till such time when we can be ready to support our war effort on our own.
We have numerous examples, Egypt (Armed itself to the teeth through loans and went on to fight the 73' war and lost and could not service the loans taken from and ended up under USSR control for a long time until Uncle Sam after the Camp David Summit bailed them out and they went from one master to another). Iraq the most recent case (Fought with Iran, arming itself through loans taken from its Arab brethren and lost the war... we all know what happened after that)