Many Americans knew from around 1933 that they were likely to go to War with Japan. The U.S. embargoes on Japan were introduced from 1936 on, to try and prevent further Japanese military actions, after they invaded China.
What stunned the Americans was the fact that the Japanese would land such a vicious and secretive blow on them with no warning. It was pure luck that most of the U.S. Navy fleet was at sea when the Pearl Harbor attack took place.
https://www.brandeis.edu/now/20
It was amazing arrogance on the part of the US to think that Japan would not react to having their oil cut off.
Mind you, those Japanese militarists had a lot to answer for because of their massacres in china.