The beauty of this arrangement is that Japan ultimately never really had to take sides. By and large, Japan always played the good cop. And Tokyo also understood how important its bases and logistical support were to the Pentagon. That came in handy during trade spats with the U.S. in the '80s and early '90s. Japan has lost tremendous economic and international clout over the past decade.
China is an ascending power.
One of the lessons of the recent downing of a U.S. spy plane is that the Middle Kingdom clearly intends to be the premier military player in Asia. Beijing is no friend of Tokyo. And given Japan's rapidly aging society, plus its dependence on imported food and energy that only open sea lanes and a conflict-free Asia can secure, Japan arguably needs Washington's security services more than ever. To imagine an Asia in which Japan's interests are subservient to China's is close to a nightmare for the Japanese. Relations between Tokyo and Beijing are testy in the best of times and noticeably chilly in down cycles, and that's pretty much where things stand now.