Throughout school (at least in the USA) we hear so much about the Third Reich, Nazi Empire, war crimes, etc., but outside of Pearl Harbor and Iwo Jima, little is said of Japan.
What was their motivation? What did they align with Germany for? What did they hope to gain?
Let me preface this by saying that the specifics of Japanese grand strategy leading up to 1945 is somewhat difficult to discern, since the kinds of records we'd traditionally rely on were largely destroyed during WW2 either as a result of the bombing or by the Japanese immediately following the surrender.
That being said, Japanese grand strategy was alarmingly chaotic and there's quite a lot of circumstantial evidence that suggests that the progression into war wasn't exactly rational. I can elaborate on that later if you'd like a follow-up, but for the most part it's tangentially related to your question and a bit off-topic, even if it does provide background. The key elements, however, are
Imperial Japan's alliance with Nazi Germany stems back to Japan's membership in the Anti-Comintern Pact, which played along with Japan's ambitions with regards to the Soviet Far East. However, Japan's goals had radically shifted by 1940. The Soviets badly mauled the Japanese at Khalkhin Gol to the point that they abandoned any ambitions in Siberia and signed a non-aggression pact with the Soviets. They had managed to get themselves embroiled in China thanks to the aforementioned escalation of border incidents by local troops, and they managed to alienate much of the West - particularly the US, who they were heavily reliant on for metals and oil - through the 1930s. As part of efforts to cut off land supply routes to Chinese forces fighting inland, Japan had taken advantage of the Fall of France to invade northern French Indochina, kicking off a metal embargo that set Japan on a warpath. When Japan moved to occupy southern Indochina, the US stepped up its pressure, embargoing oil and demanding Japan not only withdraw from Indochina but end their war in China. This created more urgency to Japan's situation and, with Japanese high command feeling unable to back down, made war inevitable.
Immediate goals for the coming war were to seize the oil in the Dutch East Indies, and going to war with the US and UK were considered integral to that - the US because it was feared they wouldn't stand idly by and that there presence in the Philippines was threatening to any Japan-East Indies supply routes, and the UK because their possessions in Southeast Asia (Burma, Malaya) were in the path of Japanese forces and offered a potential supply route to Chinese forces holed up in Chongqing.
As far as broader war goals, everything I've read seems to suggest that there wasn't really any concrete endgame. My primary source for things (Eri Hotta's "Japan 1941") seems to suggest that Japan made the decision to go to war and then made a somewhat half-hearted attempt to come up with a viable way to make the West come to peace terms favorable to Japan. In general, that meant letting Japan "win" in China (whatever that may have entailed) and keep access to oil in the East Indies. As far as how they meant to achieve this, that's where that vague sense of "everything will be alright" comes in. They did at least start the war off with plans broadly similar to the Russo-Japanese War (open with a surprise attack to neutralize the primary forces the enemy has in the theater and then seizing war goals before reinforcements can arrive), and the IJN's strategy depended on the "decisive battle doctrine" which entailed relying on a few decisive pitched battles at sea to break the enemy's will to fight and end the war. Once it was clear that this plan had failed, however, I'm not familiar enough with Japanese war plans to be sure what their grand strategy for the war was (or if there was any at all).