Why were the Americans caught so off guard on the attack of pearl harbor?

The United States was not at war.