Nuclear weapons are ultimately based on principles of nature. Some of these were published well before any secrecy orders went into effect, including the basic principles that would govern how nuclear reactors and nuclear fission bombs worked. But even those that were not published were still discoverable.
If I come up with a secret that is entirely arbitrary, such as "my first pet was named Fido," then I can keep it forever if I don't tell anybody. If, however, I am trying to keep secret that "the sky is blue," you can see how this would not be very effective — you don't have to get inside my head to learn it.
Nuclear weapons are to a large extent based on scientific facts, though there is some cleverness in their execution. But even if the United States had not released nuclear information, even if there were no spies, etc., any group of well-funded and well-motivated scientists could re-derive the exact same information, and could be expected to re-invent the exact same (or at least equivalent) means of producing them.
As it was, however, there were multiple sources of information out there for a world-be nuclear state. Some were illicit: the Soviet Union had several spies in the Manhattan Project, for example, and they were able to give them fairly detailed information on bomb design (but not much information on the processes by which the bomb fuel was made). Some were legitimate: the United States did not try to keep everything secret about the bomb project, both because it didn't believe it could (the project involved the participation of nearly 1% of the entire US civilian labor force, and was based on published scientific information, so attempting to enforce permanent secrecy of everything was unlikely to succeed), and also because it didn't believe it should, because its administrators believed that some of the technical information was necessary if the country, and the world, was to make sound policy going forward. So the US had prepared a great amount of information to release about the project in the days and months after the use of the bomb on Hiroshima. These information was frequently "large scale" as opposed to "technically detailed," but it provided a road-map for future nuclear states, notably the Soviet Union, by explaining what the US had done that had been successful.
Similarly, in the Cold War, the US used the release of nuclear information in several ways, including the mass declassification of information about "peaceful" applications of atomic energy (which were frequently "dual-use," and could be applied to military purposes), as well as the use of information releases as a form of diplomacy (showing their good will, helping allies, etc.). All of which added up to, by the 1970s, a considerable amount of information being available in the public sphere on nuclear science and technology, all of which, in the hands of a willing and well-funded state, could be turned into a weapons program.
Ultimately, the question is not why several other countries developed nuclear weapons, but why the number has been much fewer than people predicted. The answer is that whether a state acquires or does not acquire nuclear weapons is not about whether they possess knowledge (secret or not) — it is about politics, both domestic and international. Various means (treaties, political pressure, even occasional military attacks) have been used to try to dissuade states from pursuing nuclear arms, and this has been far more effective than attempting to monopolize the technology through secrecy, export controls, resource monopolies, or other "technical" means.
For further reading, Richelson's Spying on the Bomb is a good overview of international proliferation and the efforts to monitor and stymy it. For specifics on, say, the Soviet program, Holloway's Stalin and the Bomb and Gordin's Red Cloud at Dawn go into it in detail, the latter talking specifically about their use of different types of information (official and not) obtained from the USA.