Not necessarily foolish on their part. The West had gotten together to fight the Chinese during the Boxer Rebellion despite the non-existence of any standing military pact. The Japanese probably feared a sneak attack by US forces if they forged into SEA Asia, ex-US possessions like the PI. They also under-estimated the logistical capabilities of US forces, and for good reason - no one in the history of man had ever transported millions of fighting men across so many time zones to fight a war using the amount of equipment needed for modern warfare. The troops and equipment used in colonial ventures like the Philippines-American War were puny in comparison.
Then you have the fact that long distance war is tough on the nation with the long logistical tail (Uncle Sam and every European colonial power in Asia). The Russians sent their Baltic fleet thousands of miles to fend off the Japanese and were crushed at the Battle of Tsushima. Surely the Russians, with the largest empire in the world, were a more formidable opponent than the US.
Besides, Uncle Sam had always been a penny-pincher in terms of military expenditures. Would he spend vast sums of money to recover a soon-to-be ex-colony to which independence had been promised (the Philippines) and a set of islands of marginal economic value (the Hawaiian Islands) whose status at the time wasn't all that different from the Philippine Islands? From a pure dollars-and-cents perspective, it made no sense for us to fight that war. And from a security perspective, it probably never occurred to the Japanese that Uncle Sam would feel threatened by the potential Japanese conquest of the Hawaiian Islands, which are over 2000 miles away from California.
They turned out to be very wrong in their calculations, but I'd say they were unlucky rather than dumb. It never occurred to them that freedom-loving Americans would subject themselves to conscription and that US defense expenditures would ever eat up 50% of American industrial output from a pre-war base of 1% of industrial output.
Like I said the USA would not have gone to war over SE Asia
In addition attacking the USA insured the Russians that they didn’t have to worry about Japan’s treaty with Germany and aiding Germany by attacking Russia so the Russians were able to bring their Siberian divisions in to defeat the Germans at Stalingrad