Keep in mind we had conducted training exercises where our carriers attacked Pearl Harbor several times in the 30s. We knew it could happen.
I believe the UK successfully attacked an Italian naval base in such a manner as well at the start of WWII.
Nobody in 1941 thought the Japanese could or would attack Pearl Harbor first, without warnings.
As has happened more than once, we underestimated our enemies.
The military practices for lots of things but very few in high command thought much of naval air power. In the 1930s and shortly thereafter Battleships were considered the main weapon despite the Brits successful Battle of Taranto.
We did prepare Hawaii for war but the locals thought more of sabotage and guerilla tactics. And then we were introduced to the brutal power of the Kido Butai and that finally changed some minds about naval aviation power.
Yeah, but I am sure we had figured out how to defend against 1930’s aircraft. Besides they weren’t all that capable anyway as we discovered when we tried to use them against modern Japanese aircraft.