The historical experience of World War II and hostility of Japan’s neighbors were important factors in Tokyo’s long aversion to mounting a more robust defense. But so too was the opportunity to take a very cheap ride on the American military.