In this movie, we saw the POTUS speaking to the generals and chiefs asking when America was going to join Russian, France and Britain, in their fight against the vile Hun and his villainous empire building.
Queue to the next scene and the Japanese Fleet Commander is giving his briefing to his generals and saying that they will fight America.
So was Japan having it's own personal war, or did she really join Germany, hana!?
It was more of a personal thing; even as early as late 1941 (prior to PH) they were regretting joining onto the Tri-Partite Act. Unlike the western Allies (primarily the US, Britain, and the Commonwealth nations; the USSR also had its own agenda) Germany and Japan never formulated any cooperative plans together, not even in 1942 when it seemed possible (even likely) that Germany would sweep across the Middle East and Japan could capture India.
One can pretty safely assume that had the Axis won the war, that Germany and Japan would have ended up fighting for the spoils. To each other, yellow and white people were untermensch.
Japan had been at war against China since 1937. They had control of Korea, and much of Manchuria (north eatern China) and parts of southern China (inc Taiwan).
The USA had started to embargo Japan because of their reputation in their war on China (such as the Nanking masacre etc), and so Japan had to look else-where for strategic materials like oil and steel.
Japan wanted to invade southern Asia, and would have done so without touching the USA, but knew that the USA would not allow that to happen for two main reasons: 1 - the USA didn't want Japan to become too powerful (somewhat anti-imperial); and, 2 - the USA had posessions in the south pacific (Philippines) and any attack 'down that way' would be worrisome for ANY local assets.
So, Japan knew that a war with the USA was rather a for-gone conclusion and didn't want the USA to have a first strike, so did a first strike on the USA. The rest is history.
There are assessments out there that consider that Japan may have done the USA a favour in some ways in Pearl. The attack infuriated the public, and so EVERYONE was on-side. Had the Japanese just gone about their business in SEA and left the USA alone, then the US no doubt would have been at war, but would also have been seen at least a little bit as the aggressors, and so would have had resistance at home (a la Vietnam). There would have been even more resistance to doing a war in the Pacific AND in Europe.
Japan wanted control of most of Asia and thus there were places that were part of the U.S or the U.S protected not to mention the oil that Japan needed that the U.S cut off from them made things inevitable.