>>82825599
>Japan and China have no significant territorial disputes
You're missing the part about Chinese migrants, among others, flooding the country and making the Japanese miserable, rampant corporate espionage, and China funding separatist groups in Okinawa in a bid to remove US/Japanese influence from a strategically important island. And also that time Japan invaded like half of China, but if we go past WWII, Japan also has legitimate grievances, like the tributary system that took wealth from it and other Chinese tributaries (literally every country that shared a border with it). 
Additionally, you're overlooking the economics. As a resource-poor archipelago, Japan relies on open sea lanes to obtain the raw materials necessary for manufacturing, energy, and even feeding its own population. The Chinese attempts to extend its EEZ and control in the South China Sea present an existential threat to Japan, as well as Korea, so allying with America, which has the most powerful navy in the world, makes the most sense. You can always project things hundreds of years in the future, and say, "Well, things will be fine then." But for modern Japanese, allying with the Americans, who love them, their cultural/material exports, and who are already omitted to their defense, is a much better prospect than acquiescing to the nation that you know hates people, actively holds grudges over a war that ended decades before you were born, and already routinely attempts to undermine your national soveringtity is unacceptable.