While it was legitimate to ask - before the war broke out - how it could be justified, it is all the more critical to do so now that 'victory' has been proclaimed. The only legal casus belli could have been a pre-emptive strike against a state harbouring weapons of mass destruction.
Had the US, for example, bombed Yokohama in late November 1941, this could have avoided the attack on Pearl Harbour and led to a shorter World War II.
The failure of the democratic powers to intervene and prevent the genocide in Hitler's Germany or the mass executions in Stalin's Soviet Union has left its mark. Ultimately, interventions in Bosnia-Herzegovina, Kosovo and Rwanda were justified not just by the genocides taking place, but also by a general consensus among a good number of nations that the action was justified, indeed imperative.
Beyond that, however, at present there is no legal provision for eliminating dictators, no matter how bloodthirsty they may be. For the moment, all that the rubble left after the destruction of deposed Iraqi president Saddam Hussein's regime illustrates is how lousy most regimes in most of the world are, not simply in their excessive use of power, but also by the luxurious lifestyle of the tyrants ruling them, standing in contrast with the austerity, often misery, imposed on their populations. Furthermore, modern history is full of examples of sons-of-bitches being ultimately replaced by other, sometimes far bloodier, sons-of-bitches. We do not entirely understand why proper governance is such a problem. What seems beyond historical doubt, however, is that for regime change from dictatorship to democracy to occur successfully, the best, arguably only course, is for developments to occur inside the society concerned, rather than be imposed from outside.
Had the western allies invaded Spain in 1944-1945, as many urged they should, and had they overthrown the fascist dictator Francisco Franco, it is highly probable that the communists would have seized power and the Spaniards would have been no better off. Ultimately, Spain became a robust democracy because the Spaniards themselves made it a democracy.
A revealing contrast in East Asia can be drawn between Japan and South Korea. In Japan, democracy came from the barrel of General Douglas McArthur's gun. Given the absence of truly indigenous origins, democracy has never really taken root in Japan.