Japan attacked the US first, and by Hiroshima the US had 110,000 dead in the Pacific theater. Imagine living through that before judging them.
Also perhaps worth noting that after the first bomb the Japanese government was not planning to surrender. The second dropping moved things to a deadlock where half of the ministers—both in the small war council, and the larger full government—wanted to the surrender and the other half did not.
The Emperor had to be called in—an almost unprecedented action—to break the tie. Then, even after the Emperor had made his decision, there was a coup attempt to prevent the "surrender"† broadcast:
* https://en.wikipedia.org/wiki/Kyūjō_incident
I do not know how anyone can think that Japan would have stopped fighting without the bombings when two bombings barely got things over the line.
The book 140 days to Hiroshima by David Dean Barrett goes over the meeting minutes / deliberations and interviews to outline the timeline, and it was not a sure thing that the surrender was going to happen: the hardliners really wanted to keep fighting, and they were ready to go to great lengths to get their way (see Kyūjō above).
The Japanese knew for a year before the bombings that they could not win the war, but they figured that by holding out—causing more causalities of Japanese, Americans, Chinese, Filipinos, etc—the US would lose their resolve and terms could be negotiated so that Japan could (e.g.) keep the land they conquered in Manchuria, etc.
† A word not actually used by the Japanese in the broadcast.
That urgency and willingness to surrender was before Japan knew that the USSR had already agreed with the allies to declare war on them at the Yalta conference in February. The USSR committed to declaring war on Japan "two or three" months after Germany fell, which happened on May 8th. They declared war on Japan on August 8th.
We did not forward any of this information onto the other allies. Instead we chose to nuke Japan on August 6th. The Emperor was allowed to remain as a figurehead.
[1] - https://nsarchive.gwu.edu/document/28458-document-39b-magic-...
More to the point, while Hiroshima and Nagasaki were horrible events, they were cheap lessons compared to what it would have cost humanity to establish the taboo of nuclear warfare later, in Korea or elsewhere, with bombs 10x to 1000x their size.
To kill a billion people by conventional bombs would require years of sustained effort costing trillions of dollars, and I imagine the army doing that killing would collapse under the moral horror of its own actions far before that number is reached. On that other hand, thousands of nuclear weapons can be deployed by a very small group of amoral people with instantaneous destructive effects.
I've read convincing arguments (sorry, I cannot find them now) that this reasoning is mostly bogus.
One, the decision of dropping the bombs wasn't coordinated with planners of Operation Downfall, so casualties weren't a consideration. As such, it cannot be "civilized" (because the intent to be civilized just wasn't there).
Two, those casualty numbers rest on arbitrary assumptions about what the Japanese would or wouldn't do that don't hold up to real scrutiny, and ignore a host of options other than "full scale invasion" or "nuke".
Three, you cannot discount the flex towards the USSR, an argument many Japanese to this day maintain was a major reason. Which wasn't a civilized reason either.
It seems rather immoral to a high degree to send some Americans to their deaths unnecessarily because we didn’t want to use a weapon we had in our possession to end a war that we did not start.