I'm not saying Japan was good, and this isn't a callout to you. I'm arguing that the erasure of US brutality in China and the Philippines, as well as Gunboat Diplomacy on Japan itself, is why we can see ourselves as the Good Guys. This erasure is part of Manufacturing Consent. Its better to abandon the temptation to moralize the sides in war and see it as Great Power competition.

First we have US [Commodore Perry] who, in 1854, used gunboat diplomacy in Nagasaki harbor to end Japan's isolation and open it up for trade. This would snowball into the Meiji restoration, which ended the Shogunate, and an Emperor that rapidly modernized Japan's economy and military to prevent foreign domination that China was experiencing at that time.

Three decades prior to Japan's invasion of China, and a decade before Japan seized Korea, the United States and other Great Powers were suppressing the Boxer Rebellion as part of China's [Century of Humiliation] to exploit China for themselves. In addition the US, after it seized the Philippines from Spain, spent several years brutally putting down the native independence movent [p-h war]. Americans aren't taught this history, and fear of that brutality of American reprisals influenced the Japanese against surrendering during WW2.

Speaking of the Philippines, its seizure by the US and other Spanish territories after the Spanish-American war as well as the annexation of Hawaii alarmed Japan. They saw US and other imperial powers as rapidly encroaching on Japanese sphere of influence, in particular the decades of 1890s-1900s. Japan saw all of this and didn't want to be the next China. Japan also saw all of East Asia was it's sphere of influence as a Japanese mirror of the Monroe Doctrine and the western imperial powers as both a tacit threat and competition.

The US wasn't interested in helping China against Japan out of a moral duty, but protecting US interests against a rising Japanese Empire, in addition to British, French, and Dutch colonies in the Far East. The tipping point for Japan was when the US embargoed Oil and ship-grade Steel (as well as other strategic commodities and economic sanctions) from Japan throughout 1941, which led to Japan planning to seize more territory in SE Asia. To support these annexations, Japan had to push the US out of the Philippines, and to do that they attacked Pearl Harbor as a way to buy Japan time to take and hold territory before Americans could respond.

I mention all of this because Americans aren't taught this yet so much of our history hinges on these events.

[Century of Humiliation]: https://en.wikipedia.org/wiki/Century_of_humiliation

[Commodore Perry]: https://en.wikipedia.org/wiki/Perry_Expedition

[p-h war]:

https://en.wikipedia.org/wiki/Philippine%E2%80%93American_Wa...

https://en.wikipedia.org/wiki/United_States_war_crimes#Phili...