The reason for the two bombs were that 1. The US did not want Japan divided after the war as was becoming clear that this would happen to Germany. The Japanese were no slouches, they were vicious in combat and had a ridiculasly powerful and modern navy on the outset of war but they did NOT know when to quit. With a simular resolve as the Brits had against Hitler, they were training civilians to prepare for an invasion. Had either bomb of failed to ignite, they were to be followed by incinerator bombs anyways. Again, the US did not want divide up Japan and they knew the soviets, who had denied the US to base aircraft in the USSR against the Japanese, and who had previously refused to declare war on Japan, were soon to declare war on them. The US did not want the Soviets any say or control over Japan at all.
2. As I mentioned earlier, the Japanese were no softies, they were effective warriors even at the late stages of the war. If the allies were to launch an invasion of Japan itself, the war would have lasted much much longer at a much larger cost to human lives both allied and Japanese. They estimated MILLIONS. The length of the war was causing the people of the US to become weary of war, the costs were skyrocketing and for the same reason we had Jim Crow after the US civil war, lost in Vietnam and so on, people lost their will to continue. War bond sales were declining, mothers, fathers, wives, and other family members did not want their loved ones returning from Europe redirected to the Pacific theatre. The US gov knew this and wanted it to stop. Even after the two bombs killed so many people, they only stopped after the Soviets did declare war and that was only because they knew they had no factories, no Navy, no trained soldiers left, no resources and no way to win. They themselves did not want to surrender to the soviets .