The Japanese were ready to surrender - the United States was beating down their front door and the Soviet Union was finalizing plans to attack from the rear. The Japanese only requested from the United States that the Emporer be allowed to stay as head of state - it was part of their long tradition of honor. America responded with the atomic bombs. There was no justification for dropping the bombs because afterward, they relented and allowed the Emporer to stay anyway.
But the bombs were a new "toy" in the hands of the irresponsible Americans and although they had been studied from a distance during testing, the United States never had a "real-time" test to see what kind of destruction would occur on cities and people. With the war coming to a close, they would never get another chance to do so.
Thus, the United States used the Japanese as Guinea Pigs to see what kind of death and destruction would happen. This made the United States guilty of the same war crimes they accused the Nazis of - with one big difference: when you win the war you get to call your atrocities "justified" and sweep them under the rug.
ON a side note: this is the reason the Federal Reserve Bank was created. They give the United States unlimited funds for foreign policy - such as to fight wars. Having the Federal Reserve Bank in your back pocket, you get to fight indefinitely until your opponent ultimately runs out of financial resources, forcing them into defeat. This means that the United States will always win whatever war they're involved in - and commit whatever war crimes they want since they'll never have to answer for them.