The US had been preparing for WW2 for several years before Pearl Harbor, but the political climate in the US was still one of isolationism. It has been suggested in a theory which I find quite plausible that Germany had plans to destroy the US economically by defeating the British Empire and closing down British markets for US goods. As the US economy had become dependent on exports primarily to Great Britain and her colonies, this situation was a grave one.As with Germany's rearming in violation of the Treaty of Versailles, the US rearming had to be done with some secrecy to conceal from the US citizenry that their country was preparing for war.
For example, the Boeing B-17 Flying Fortress was publicized as a defensive weapon system to replace obsolete coastal defenses and intercept enemy ships hundreds of miles out to sea. After the war began it was seldom used in this way. Its major use was as an offensive platform for bombing enemy cities.