They both had very similar goals, to cripple their opponent. The bombs were aimed at Japan's industrial sector to prevent more military equipment from being made while 9-11 was aimed at the financial sector of the US; its "military equipment for expansion" in this day and age if you will.

While one was true military and one figurative military, they were viewed as the same from the attackers' point of view.

Also, who's morals are we talking about here? Whlie someone in the US or Japan that lost someone in their respective attacks thinks that these were morally reprehensible acts, Those on the other side thought that they were doing good and bettering their world and the world of others with their actions. It's all about perspectives.