Two fateful mistakes:
Launching the attack galvanized a nation that had been deeply divided on entering the war and transformed it into 133 million people who, as Barbara Tuchman put it, were so angry they were willing to swim to Japan and strangle anyone they found there.
Second, the military blunder of launching the first and second waves of planes against battleships, rather than the oil tanks and machine shops, when it turned out the aircraft carriers were not in port. Killing the infrastructure at Pearl would have accomplished the same objective as sinking the carriers: It would have knocked America out of the Pacific for a year and made the West Coast vulnerable to attack, allowing Japan to consolidate its gains. Sinking battleships was a strategic nothing, but the Japanese commanders were simplemindedly convinced that destroying the maximum number of ships would achieve the optimal result.