Why? You prefer that millions more to have died?
Approximately 125,000 + died immediately in both blasts with many subsequent deaths due to radiation and physical trauma, afterwards. This was a fraction of the deaths from the firebombing campaign. The point was a single plane could do the destruction of several squadrons of bombers. It was immediate endgame. End the war, or end Japan.
The estimate for an invasion of mainland Japan had a million American deaths and about 3-4 million Japanese deaths. It was already established by the Kamikaze attacks, that the citizens of Japan were willing to forego self preservation to defend the Emperor. Households, including children, were trained to defend the homeland, street by street. The American brass had the daunting task of sending soldiers to attack civilians targets, including women and children, to pacify the citizens.
As horrid as the nuclear blasts were, they were far more humane than continued firebombing, or a mainland invasion.
As for Gaza, placing rocket launchers beside Mosques and other civilian sites is the cowardice of Hamas. So is placing underground command and control bunkers underneath the Gaza hospital.
When cancer is discovered, you destroy or excise the to cancer to restore good health. Sometimes healthy tissue is lost to remove the cancer, but one must do what is necessary.