It is an odd category, and Japan is often considered to be "Western" - these days at least. That certainly wasn't the case even a few generations ago.
I think it's ostensibly supposed to be more about shared cultural values, but even that is a pretty weak way to divide countries. Perhaps "an ally of the United States" is a little more accurate?
Any societal dividing line like this is bound to hit on problems once subjected to the real world.
I think Japan likely shares more values culturally with China than USA outside of political systems. In any aspect outside of that Japan is not western.
The leaders of Japan during the Meiji era (starting 1868) will be sad to learn that their attempt to thoroughly Westernize Japanese society failed even though it enabled Japan to dominate China (and most of the Western Pacific) for decades.