From what I understand they knew very well that they would be outmatched in men, ships, resources, and were already fighting the war in China. Yet they attacked anyways. Did they really think they would come out of it ok? Why?
The Japanese war aim was not to raise the Rising Sun Flag above the White House - far from it. More can always be said on the matter of Japanese wargoals for the Pacific War, so if you reading this requisite piece of boilerplate, yes, YOU, want to make a post of your own, don't let my linkdrop stop you!
For the meantime, OP, in this previous thread, u/Starwarsnerd222 has an excellent overview of why the Japanese went to war, and it also has one of my previous linkdrops on the same topic, with answers from u/jschooltiger and u/ParkSungJun.