Before Pearl Harbor the Axis powers, Germany, Japan and Italy were a real existential threat to democracy. In fact before the US became fully mobilized for war things looked really dicy.
From hindsight it has become clear to me that things weren’t quite so bad. First Germany proved incapable of invading England, which would have proved to be catastrophic, and then Hitler overplayed his hand by invading Russia. But, still, the US could not have permitted Japan’s murderous army leader, Tojo, to establish an empire encompassing all of the Far East.
After slogging it out with Japan for almost four years with ever building casualty rates, America had no stomach for invading the Japanese home land with an estimated two million casualties. So we dropped the first atomic bomb and when that did not bring about Japan’s surrender we dropped our only remaining second atomic bomb.
And seeings that our B-29 fire bombing had already just about burnt Japan to the ground, the Japanese emperor finally excepted unconditional surrender against the wishes of his right wing Army warmongers.