In hindsight you’re right.
The Red Army kicked the Japs butt in ‘39, and Japan signed a Non-Aggression pact afterwards. Japan was in deep trouble, that is, until France, Belgium and The Netherlands fell, which opened up those colonies to the Japs, and gave them a lifeline.
Now if Japan had free reign in the Pacific, they could have been freed up to help Hitler in the Soviet Union.
Hitler was hoping that Japan would open a second front in Russia. It would have made more sense for them to do that instead of attacking the US.
But, Japan made a bunch of decisions that were more ego than strategy.