Wow, so you’re justifying a sneak attack on the U.S. when war had not been declared by either nation? Are you sure you’re on the right web site?
And to answer your last question - it ended the war and saved many, many more lives than it cost, including Japanese lives. If you don’t think that’s the case, you need a history lesson.
And your belief that there was no state of war between the U.S. and Japan before Pearl Harbor is delusional at best, and deceptive at worst. Do some research on a guy by the name of Claire Lee Chennault. The U.S. military had drafted plans to bomb Japanese cities from mainland China before December of 1941, and began shipping the aircraft and munitions there in October of that year.