(Again my views only.) I think it was a direct reaction to the aggression of 1853. It was preceded by posturing/maneuvering in the South Pacific if I'm not mistaken. To be clear, I don't think it was justified or proportionate, but I do think those events were closely linked in that Japan saw Americans as encroaching on their sovereignty and an imminent threat from the "East".
The attack on Pearl Harbor in 1941 was just a misunderstood act of extending an olive branch?