Of course we attacked Japan because they attacked us, but if was not religious on the part of Japan, why are there limitations written into their post WWII constitution prohibiting members of government from participating in certain Shinto practices? And why did we require it be written into their constitution?
It didn't matter an iota that our response was not based on religion. Japan's war was based upon the Shinto religious teachings that began in the 1860's when Shinto was made the official religion, and all the population was required to accept Shinto education.
I think the difference is that defeating Japan was sufficient to defeat Shintoism, because it was a purely nationalist religion. There is no one country we could defeat to defeat Islam.
Well, maybe taking out Mecca would work...but I think that's sort of a last resort!