It also prevented Russia, after having annihilated the nazis (from the east), from spanking Japan's ass and conquering Japan.
The US killed two birds with two nukes: they prevented Japan from continuing their rampage and they prevented Russia from taking Japan.
Do you really think any European country was in shape to face Japan? Russia experienced a famine right after Germany capitulated, they almost lost Moscow, they received billions of dollars from the US to be able to finish the war. I think just trying to mobilize their troops to the east would have been unimaginable