Those two nukes saved over five million Japanese deaths and one million American casualties by avoiding an invasion of the home islands.
It also saved Japan from being divided, like Korea, and from a Korea-like Civil War.