It was needed so that Soviets won't capture Japan before US. And VERY nice side effect of those nukes was the demonstration of this power to have upper hand in all the talks ongoing around that time. Soviets were rather cautious and obedient after the WW2 untill they built their own bombs. US should have bombed them before that, it's pity that Dropshot and Unthinkable operations were so delayed.
And I had good laugh at all those arguments like "estimations were that more innocent ppl would die without nuking them". Brainwashing must be funny.







