Title says all. I cant imagine whether it was political, economical or both or else.
Germany wanted to control continental Europe and establish the Third Reich, while Japan wanted to control the Asia-Pacific region and establish the "Greater East Asia Co-prosperity Sphere". These visions of empire were ideologically linked, based on nationalism, racism, and militarism, with a goal of political domination and economic exploitation.
In 1936, Germany and Japan entered into the Anti-Comintern Pact opposing Communism. Italy joined in 1937. In 1939, Germany and Italy entered into a military alliance, a Rome-Berlin axis or as Mussolini called it the "Pact of Steel". The Tripartite Pact of 1940 created the military alliance between Germany, Italy, and Japan historically known as the "Axis Powers".
The Axis alliance was founded on opposing the Soviet Union and international Communist parties. The purpose of the alliance later changed and broadened as Germany signed a neutrality pact with the Soviets in 1939 before invading Poland and going to war with France and the United Kingdom, and Japan signed a neutrality pact with the Soviets in 1941 before bombing Hawaii and sweeping through Southeast Asia.
After the United States declared war on Japan, Germany declared war on the United States although it wasn't really obliged to do so. And although Germany invaded the Soviet Union in 1941, Japan respected its neutrality pact with the Soviets. The Soviet Union did not declare war on Japan until the final month of the war, August 1945.