The United States stored nuclear arms in Japan at that time because it needed to. Japan was an important part of an American-led coalition which eventually won the Cold War. That coalition depended on nuclear weapons and maritime power. To counter overwhelming Soviet power in Europe, Washington needed nuclear weapons, maritime capability and offshore allies such as Japan. For Tokyo, alliance with the dominant maritime power gives optimal security.
Japan is heavily dependent on foreign trade and needs maritime protection.
In January 1950, the Chinese-Soviet alliance, which brought together the great land powers of East Asia, was specifically targeted at Japan. Stalin gave North Korea the green light to attack South Korea, presenting a clear threat to Japan. Nuclear weapons, while not usable in a regional conflict such as the Korean War, were vital to America's ability to prevent the global balance of forces from tilting decisively in Moscow's favor. The 1952 U.S.-Japanese security treaty gave America carte blanche, including the right to store nuclear weapons in Japan and to launch them without consultation. Revision of the treaty in 1960 obliged Washington to consult Tokyo about any changes in U.S. military equipment in Japan.