Japan had a very strategic plan building up before they went to attack America.
Pearl Harbor. Of all the aspects of the attack on that 7 December 1941 Sunday morning-including its treachery, swiftness, daring, and skillful execution-none seems more compelling than the assault's total surprise. This element is even more striking, knowing that just prior to the attack, a U.S. Army radar site at Opana Point, on Oahu, tracked incoming aircraft, and the Navy discovered a foreign submarine at the entrance to Pearl Harbor. Add to this mixture that American code-breakers were reading Japanese diplomatic messages of all types, and it seems simply incredible that Japan could pull off a thorough surprise attack. -Hanyok
The reason Japan was able to keep their plan hidden from the U.S is because of all the plans they took carefully to execute their plan. They spent a while studying American broadcast signals to wait for the perfect time to attack. They were also covering up their tracks to their plans.
This image shows a line of people wanting to join the navy after the bombing of Pearl Harbor and it shows that the people all around the U.S. cares about what happened at Pearl Harbor that they joined to help.
“Line of men signing up for the U.S. Navy following the 1941 attack on Pearl Harbor, Los Angeles, Calif.” 1941, Digital Public Library of America.