Natzi Germany ,Facist Italy and Imperial Japan were invaded for being unfreindly to the US , it is a matter of degree.
=============================
No, they weren't.
The Japanese bombed Pearl Harbor, and when the US declared war on the Japanese, the Germans and Italians declared war on the US, as the three were all allied.
There was no reason to invade Iraq. It posed zero threat to any American living in America.