You don't understand the backdrop against which the decision to drop the nukes were made. The US losses in the Okinawa invasion alone was horrendous. How much more the main islands of Japan? And besides after 4 years of war and monumental loss of American lives (other lives were lost but I'm sure it was little or no consolation to the Americnas) the Americans were in no mood to send their young people to a death trap in Japan. Now, the question is, if you were the President of the US at that time, would you instead have sent ground troops to invade Japan?
The US had actually dropped leaflets warning the civilians of their impending doom, which I guess is a positive...
Leaflets warning Japanese of Atomic Bomb, 1945 . Truman . WGBH American Experience | PBS
IMO this still does not justify what happened, and either way, dropping two bombs was just overkill. Atomic weapons have after-effects far prolonging their intended period of use, and I daresay the Japanese surrender could have been achieved in other ways. But the Americans wanted to showboat their new power, and I can only thank the world that people have not been subject to such an atrocity again...
It is interesting but I was reading somewhere that during the Korean War, the US were considering using Atomic weapons against NK given the desperation the US troops were facing, but it was withheld, largely because America didn't want to lose its ability to form friends in the E-Asia (Dropping successive bombs on Asian neighbours = not good for relations).
Interesting to also plot the huge 'Americanization' of both SK and Japan in the 60's and 70's that occurred later.