We were squeezing Japan over their invasion of China by cutting off their oil imports.
Japan had too much invested in China to back out. They felt their only option was to make the US unable to enforce the embargo.
Japan originally planned to attack the Philippines and ambush our fleet as we launched our counter attack. I believe it was Yamamoto who convinced the Emperor that a direct surprise attack on Pearl Harbor was the only way to ensure victory, as the ambush had too many variables and was open to detection by the US.
Anyway, Japan felt they had no choice. No amount of diplomacy, short of the US allowing the oil imports and thus supporting Japan’s invasion of China, would have stopped the attack.
If you wanted to stop US involvement in WWII, you would have to have stopped Japan’s invasion of China.
I wonder now, if we knew China would have gone Commie, if we should have just supported Japan?