I think there is too much dependency on old history for trying to interpret current affairs today on your part. I'm going to skip a history of Japanese and American relationship, there's too much to say. But I will say that Japan likes the US today not because of old habit. But it is because Japanese are seriously concerned about Chinese expansion. And the very nature of the CCP China is something that Japan does not like at all. There are two main points. CCP's anti-Japanese propaganda and China's territorial claim on the Senkaku islands.
Check out the feelings of affinity Japan had with China over the course of history.
As can be seen, the 1980s were good. But when the Tianemen Square massacre happened, sentiment dropped. What followed through the 1990s was a raise of anti-Japanese propaganda, and it continued into the 2000s. Then in 2010, a Chinese trawler rammed a Japanese coast guard ship near the Senkaku islands.
And from there own, it just got worse and worse. China increasingly looking threatening. China always telling Japan to properly look back at history and to not become militant, as China's defense budget jumps and Japan's defense budget remains static, and China making massive bases in the South China Sea, and China holding a 2015 massive military parade that was supposed to "make Japan tremble". CCP Chinese blockheads have pincered a pacified Japan with a widening defense budget gap on the one hand and allegations about being militant and not properly respecting history on the other hand. The US did not have to do anything to get Japan on the US's side. Whatever gives the Chinese patriots the impression that Japan is just doing what America commands it is dead wrong, you can bet on it. Japanese feelings of affinity toward the US are at an all time high. Japan and the US fully committed to each other. Following is a graph about affinity towards the US.
Here's the full survey with the two graphs and lot's more information.
http://survey.gov-online.go.jp/h28/h28-gaiko/summary.pdf
Other countries such as India, Vietnam, and the Philippines have all steadily been building up defense relations with Japan in recent years. The building of defense relations is all stemming from fear from an overbearing China. A few of many examples if it happening which lead me to think that is the case. JMSDF have made a number of visits to the Philippines just in 2016..
And the JMSDF made their first visit to Vietnam in 2016 as well.
Japan and Australia have been developing defense relations as well, with the US. Again, the following all from 2016.
And there are more examples of India and Japan developing defense relations. All these countries of course want to keep on doing business with China, but they are all a little nervous about China's assertion in the South China Sea. Well of course, Vietnam and the Philippines have direct dispute with China in there.
.