I suspect, without proof, that the USA let them bomb pearl harbor so that they could get public support to finally play full scale. I find it hard to imagine a fleet getting in without detection when they already had most codes broken.

I like the part where they only bombed old battleships that were mostly junk and the aircraft carriers were out of port playing hide and seek at the time.

Just a suspicion, but it's not an unthinkable thing.