As Skywalker said above, the Japanese were defeated by the fire bombing and were near surrender. The outstanding issue was the fate of the Emperor, which was a not a significant issue to the Americans. So why subject the Japanese civilians to the horror of the Atomic bomb?
Well Russia, under the leadership of Stalin wanted to continue Hitler's conquests and place Europe under communist rule. Stalin was a monster and had killed more civilians even than Hitler. Truman ordered the bombs dropped to show Russia the power the United States now had in a deployable weapon. Knowledge of the Atomic bomb was rumored, but Stalin did not believe the Americans had a working weapon because they were not looking to use it to further their conquests. Truman said of the dropping of the bomb that his biggest fear was the bomb would not work, and Stalin would accelerate his aggressions on the European continent.
Ironically, those poor souls at Hiroshima and Nagasaki probably saved 500,000,000 lives as it stopped Stalin from escalating to all out war in Europe. 70+ years later that peace, for the most part has held.
So, it's amazing to watch our president and much of the GOP cozy up to that same communist Russia that so many Americans have given their lives to protect our freedoms against. Tomorrow is Pearl Harbor Day. 71 years later, America is again under attack again.