Well the Japanese claims they had to attack pearl harbor and declare war on the US because of US sanctions against them at the time, sanctions which prevented access to much needed oil, so the Japanese need to expand to take what they needed. Now why were there sanctions on Japan at the time? Well the public answer is that Japan had invaded china as was frankly a killing machine of such berserker viciousness to the Chinese that even the Nazis found a hard time stomaching the horrors. Underneath that there was perhaps some yellow pearl fears amongst the Americans, its complected. Short answer is Japan attack Pearl Harbour.
I was born during that war, and when I got old enough to ask questions that explanation is pretty much the way my parents explained it to me.
The U.S. understood Japan well enough to realize that if they really wanted to make the transition to a modern, industrial nation, they would do it right and do it well, putting all of the country's effort into it. They might well have ended up eclipsing the U.S. as the world's largest economic power. I don't think we were that yet, but with the Europeans resolutely destroying each other's industrial bases, we certainly would be by the end of the war, and we didn't want to be overshadowed by Japan.
We were (probably rightly) convinced that the U.S. mainland could not be seriously attacked, so unlike the European nations we would emerge from the war with our infrastructure intact and an economy that had been pumped into high gear by the manufacture of aircraft and other weapons. So we blocked Japan's access to the oil fields of Indonesia. This risked war, but we were quite certain that we'd win, turning Japan into a gigantic refugee camp. (I don't know how many Americans expected us to develop nuclear weapons, but even without them the result would have been the same, although with a much higher body count on both sides. We would have to invade the country and fight with conventional weapons until we captured the capitol, since the Japanese considered surrender to be a dishonor they could not bear.)
This was indeed what happened. Our economy boomed for thirty years after WWII. Much of that was due to our continued manufacture of aircraft and other weapons. This was justified by the Cold War against our former ally the USSR. For us, the Cold War was an opportunity to make a lot of money, but for them it siphoned off about half of their GDP and was, arguably, the reason their economy ultimately imploded and Perestroika happened.
Meanwhile Japan's rewritten constitution prohibited the nation from ever again establishing a mighty military, and in any case their defense was guaranteed by their new best friend the USA--politics sure is strange. So they built an economy based entirely on consumer goods. Rebuilding from the ashes of the war (with loans provided by their generous new best friend), they had the most modern industrial infrastructure of any nation--well perhaps along with their wartime ally Germany, which was also rebuilding itself into an economic powerhouse with American money--did I already say that politics is strange?
I don't think anyone who was alive during WWII would understand how the world got to be the way it is today, much less understand that this happened
because of WWII! My parents lived into the 1990s and they never stopped scratching their heads, and asking me if I understood what was going on and why?