They didn't. Unlike radiation from most civilian nuclear accidents, radiation from the nuclear bombs in Hiroshima and Nagasaki dissipated rather quickly. When the first radioactive tests were conducted under the allied occupation, it was found that radiation was well below safe levels. This is because the half life of uranium allowed radiation to dissipate by as much as 99% within the first 48 hours of the bombing.
The decline in radiation levels was also assisted by the rebuilding of both cities. Residents, not understanding the dangers of radiation, returned almost immediately and cleaned most of the radioactive material. In September of 1945, Hiroshima suffered a flood which killed more than 3,000 people and washed away most of the remaining rubble from the nuclear bombs.
State planning for the rebuilding of Hiroshima started in 1949, when jurist Tanaka Jiro, Undersecretary for the Interior Iinuma Kazumi and Hiroshima mayor Hamai Shinzo lobbied the diet to pass the Hiroshima Peace Memorial City Construction Law. This law funded the city's rebuilding and enabled rapid economic growth. From 1947 to 1960, the population increased from 387,447 to 590,972.
Supreme Command of Allied Powers (SCAP), known in Japan as General Headquarters (GHQ) was minimally involved throughout this process, except by signing off on the Hiroshima Peace Memorial City Construction Law. This was because of its ideology and style of governance. Like the US government itself, GHQ operated as a "regulatory state" when it came to the economy, vetoing ideas from below it did not like and breaking up monopolies. It did not get involved in "economic planning". As a result, the details of rebuilding were left up to two departments of the Japanese government, namely the Ministry of Commerce and Industry (Ministry of Industry and International Trade after 1949) and Ministry of Finance.
Sources:
Hamai, Shinzo. The Practice and Problems of Long-Term Planning: The Case of Hiroshima City.
Takemae, Eiji. Postwar Labor Reform GHQ Labor Policy History.
Takemae, Eiji. GHQ.
Hayashi, Fumio. Modern History of Defeat and Reconstruction.
Daizo, Miyagi. Post-war Asian Diplomacy in Japan.
Generally fallout is going to be a factor of two things - how much fissile material is spit and how many neutrons are absorbed by elements that become dangerously radioactive when they absorb an extra neutron.
In the case of the weapons used in WWII both were fairly small with low yields that didn't result in huge amounts of radioactive byproducts created from the primary reaction itself.
Also, the bombs both exploded high in the air. First, this spread what fallout was created from the primary reaction over a wide area where it would be fairly dissipated. But more importantly the neutrons that weren't captured by the bomb weren't able to react with anything they could turn radioactive. Air is made of oxygen, hydrogen, carbon, nitrogen, and argon. None of those elements tends to be transmuted into anything dangerous when it absorbs a neutron. Well, oxygen will re-emit a neutron it emits after a second or so. The neutrons emitted will either decay into protons or create relatively innocuous isotopes like carbon-14 or deuterium.
If a nuclear weapon explodes closer to the ground it might encounter elements like sodium which will become dangerously radioactive when they absorb a neutron.
It might be worth playing with Nukemap to see how detonation height and yield can affect fallout.
This isn't to say that the bombs didn't release dangerous radiation. They did but it was all in the form of high energy photons which can cause radiation sickness and cancer but which can't transmute materials into other isotopes that can go on to release radiation in turn. In general the area destroyed by the blast and fire of a nuclear weapon increases faster than the area affected by dangerous levels of ionizing radiation so high energy photons are a more significant fraction of the danger from low yield weapon as used on Japan than they would be from a modern thermonuclear weapon. If you're up wind from a megaton explosion the range at which you have to worry about cancer is well with the range at which you'd be burnt to cinders.