The US managed to put together only three bombs by August 1945: one uranium bomb and two plutonium bombs. The Manhattan Project scientists knew that the mechanically simpler uranium bomb would work, but they weren’t sure about the more complex implosion-type plutonium bombs, so one of them was expended in a test (the Trinity explosion). That left them with two operational bombs, which were used at Hiroshima and Nagasaki. Months earlier, U.S. analysts had concluded that it would take at least two bombs to (hopefully) convince Japan to give up: the first bomb to prove that the U.S. had a functional atomic weapon, and the second bomb to prove that they had more than one.
Regardless of the outcome of the A-bomb attacks, it was prudent for the U.S. to plan for an invasion of the Japanese home islands (Operation Olympic and Operation Coronet) in case Japan didn’t surrender after the A-bomb was used. Such an invasion required preliminary steps, one of which was to prepare to transfer some U.S. troops from Europe (where the war had ended in May 1945) to the Pacific. This transfer plan infuriated and dismayed the G.I.s in Europe who had expected to be sent home once Germany was defeated, but fortunately it never had to be carried out due to Japan’s surrender. Taking Okinawa for use as a U.S. staging area, and to eliminate it as a Japanese airbase, was probably another necessity.
Conceivably, the U.S. could simply have continued to fire-bomb Japan into eventual submission (Curtis Lemay’s B-29s managed to demolish much of Tokyo without using any atomic weapons), without an actual invasion, if Japan had not given up. One argument against this strategy, however, is that the many months this would have required would have given the Russians (who declared war of Japan in early August and invaded Machuria) an opportunity to land troops on the Japanese home islands – perhaps even before the Americans themselves could land. A Russian occupation of part of the home islands would have greatly complicated the settlement of the war and the establishment of the post-war power balance. As things turned out, Japan surrendered before the Russians could set foot on the Japanese home islands; the Americans occupied the country, and basically took the position that Japan was now exclusively in the American sphere of interest and control, just as Eastern Europe was exclusively in the Soviet sphere of interest and control.