The bombs were an atrocity against a nation that had been committing atrocities of its own.
There are no moral winners in war.
But it remains true that if Japan or Germany had had the bomb, they'd have bombed civilians without compunction, discussion, or regret.