If they have nukes, they have the power to tell us no when we demand they do our bidding. To make it simple, it's a way for the bully to keep the bullied from becoming strong enough to fight back.
We sell this lie to the people on the pretense that we can not trust these nations with the power that nuclear weapons will give them. but the above is the true reason.
lets create a hypothetical world where gun smithing knowledge to build firearm was something proprietary to the police and military. Every once in a while human ingenuity gets the better of a citizen and they start to learn on their own how to fabricate a firearm themselves. Just as they get close, the government swoops in and confiscates all the citizens shop equipment and design plans and schematics, then makes them submit to random inspections to ensure that they do not resume their effort. Sound familiar? The US doesn't want other nations to have nukes for the same reason the police and our government doesn't want citizens to have guns. Without guns, we are easy to keep in line. With guns, they would have to use scorched earth tactics that would likely completely destroy all of the people they would hope to subjugate.
When Israel began developing their nuclear weapons program, our relationship was very different. Those of us in the nuclear community feverishly sought to end their nuclear weapons program to keep them from having nuclear arms. The Israelis knew that the only way to be taken seriously, and get equal benefit from alliances with the true worlds power brokers was to have the same destructive capability. Without it, they had little bargaining power. With much subterfuge they were able to build a nuke right under the noses of inspectors and ultimate achieved their goal and TA-DA, they are now one of our closest allies.
Think of the world as the pre-civil war united states, and those without nukes are the slaves and those with nukes are the masters. If you had nukes, would you want your subjects to have the power to rise up and defy your wishes? Slave owners didn't allow their slaves to learn to read and wright for the same reason we, today, don't allow developing nations to have nuclear weapons.