Yes, however, I doubt that makes it alright in the minds of the many innocent Japanese people who were affected by the bombing.
War was a completely different animal in those days. Bombing civilian populations pressured governments to surrender. That was before the politically correct wars of today, in which civilian collateral damage is unacceptable. How do you suppose the innocent victims at Pearl Harbor felt about being bombed by the Japanese?