The main reason the Japanese attacked Pearl Harbor was:
They wanted to build a Pacific empire without interference.
This attack was part of Japan's broader strategy to expand its influence and control over Asia and the Pacific region, while simultaneously eliminating the threat posed by the United States in that area.