Why did the Japanese attack Pearl Harbor?

The Japanese attacked Pearl Harbor because they wanted to control the Pacific Ocean.
The Japanese purpose was to destroy Pearl Harbor to make the Americans force less, useless and purposeless. The outcome resulted in the opposite.
So that US would surrender and not fight back in WW2.
Essentially, the Japanese attack the US Navy at Pearl Harbor so that the United States would not be able to interfere with Japan's expansion in the Pacific. While the attack slowed the US response, it did not prevent intervention.

The Japanese bombed Pearl Harbour in the hope of destroying the American fleet, and prevent America from interfering in the Japanese invasion in Asia. Instead, it brought America directly into the conflict. Though many ships were damaged or sunk, with a huge loss of life, the aircraft carriers were at sea and safe.