Why should the US and other selected countries have the right to own nuclear weapons while other countries are denied that right?
I figure it's all a "cosmic joke!"
Because the US Govt believe they have the right to dictate to the rest of the world
As with many aspects of international politics, there is no Right.
In reality, what we're faced with here is the best solution available to a problem that doesn't really have any correct answer.
The fact is that nuclear weapons are horribly destructive. So destructive, in fact, that a very limited number of them can inflict almost total damage on any existing country. Thus, it makes sense that the world would like only those who are very, very careful about their use of these weapons to be able to possess them.
To paraphrase Spiderman: "With great power, comes great responsibility".
From an outsider's viewpoint, one would only want those countries which have shown a long history of restraint and responsibility to possess such weaponry, in order to reduce the chance that they would be used. That is, you would want only those countries who would probably never use them to own them.
Given the modern realities of this world, since the world isn't able to go out and say "country X deserves to have them, while country Y doesn't", the only alternate is to say: "those who have them try to eliminate them, and those who don't shouldn't be allowed to get them".
Part of the Nuclear Non-Proliferation Treaty is a pledge by those countries possessing nuclear weapons to work to reduced their inventory. Frankly, both the US and USSR are the only countries with nuclear weapons which are upholding that clause.
In realpolitik terms, there is no benefit to anyone to allow a new member of the "nuclear club", EXCEPT to the country gaining the nuclear ability. Thus, in game theory terms, if you have 100 countries, 10 with nuclear weapons, allowing 1 country to gain nuclear weapons causes 99 countries to have lower security. Thus, the concept of collective security drives the demand that nuclear proliferation be stopped.