It has been justified repeatedly over the years both in terms of relativism ("The firebombing of Tokyo killed more people, yet isn't so controversial"), and in terms of hypotheticals becoming certainties ("The empire was never going to surrender without a massive fight. The US anticipated unprecedented losses from an invasion of the main island, and is still giving out purple hearts printed in anticipation of this invasion")
In the end the historical narrative was that dropping the bombs was necessary to end the war, as written by the winners.
The reality is that we just don't know what would've happened if the US waited. Japan was not an active threat any longer. What was? The Soviet Union that would've certainly "helped" invade Japan, and would've also demanded to carve it up post-war the way they did with Germany.
From evaluating the overall evidence it seems pretty clear that this is what was driving the urgency to drop the bomb, not once, but twice.
The irony is that it's entirely possible that for the population of Japan this ended up a better outcome than having half of it face the "East Germany" scenario for the next 40 years.
And while the "blight" of having actually used nuclear weapons to kill civilians may be on the US forever as the only nation to have done so, the horrors of Hiroshima or Nagasaki almost certainly helped prevent nuclear weapon usage throughout the cold war. If they were never tried, it's almost certain that either the US or the USSR would've been itchy to be the first in some future engagement, and then who knows what would've happened.
So the truth is messy. My position is that the Hiroshima/Nagasaki bombings were NOT necessary to end WW2 and did not reduce the overall bloodshed within THAT conflict. But this action counterintuitively helped improve Japan's prosperity over the rest of the 20th century and may have reduced the likelihood of an actual nuclear war over the rest of the Cold War.