The use of the atomic bomb on Hiroshima and Nagasaki was objectively immoral as are all intentional killings of noncombatants during times of war. Many Japanese opposed to the imperialist regime were unjustifiably murdered in those bombings.
We also now know that the US was aware of Japan’s intention to surrender to the USSR and of US Secretary of Defense Henry Stimson’s desire to see the atomic bomb in the hands of both the Soviets and the US as a deterrent to a World War Three, the concept of Mutually Assured Destruction before it was given a name.
The strategy was successful. Japan surrendered to the US not the USSR. The US and Soviet Union had a long and expensive Cold War which eventually bankrupted the Soviets and there was no World War Three.However, nearly every conflict in the world became some sort of proxy war between the two sides in the Cold War instead. Third World lives were sacrificed in place of Americans and Soviets.