German economic success after WW2 has brought millions of immigrants to it. Nowadays Germany is multiethnic and 20% of its population are non-ethnic germans. Britain has similarly become more diversified. Japan however, has remained extremely homogeneous by modern standards, its biggest minority being Koreans (their immediate neighbours) and everyone else being less than 2% of the population.
What happened here? Why did Germany attract so much labour, but Japan remained closed off? During Japan's booming years, you'd think that cheap labour from the poorer parts of Asia would come pouring in.
Short answer: because Japan didn't want or need it. Japan also had more immigration than is acknowledged - quite a lot of Koreans who went to Japan during the Second World War and stayed -- not regarded as "immigrants" in the statistics. Also not regarded as immigrants were the large Japanese communities and military manpower that repatriated over the years from the end of the war through the early 1950s (eg from Manchuria, Japanese prisoners of war in the Soviet Union, other places-- Japanese were still "coming home" for decades after the War); with a steady flow of returning Japanese manpower -- and not much work for them-- Japan neither needed nor was an attractive destination for anyone else. Additionally, through the end of the Allied Occupation, permission to enter Japan came from the occupying US authorities, not from the Japanese (who themselves needed American permission to travel abroad).
Japan didn't have a labor shortage in the 50s and 60s and when they did want to source cheap labor, they did it by expanding their manufacturing to Taiwan, Thailand, later to Vietnam and China - moving the work to the workers rather than the workers to the work. Unlike Germany, Japan has "trading companies" (sogo shosha) - like Marubeni and C. Itoh- whose function is in part to outsource and to manage international supply chains for Japanese industry.
Essentially - and little remarked because it's politically so sensitive- Japan retained it's imperial trade relationships to some extent. Germany didn't do that - West Germany was essentially cut off from Eastern Europe by the Iron Curtain - where Germany had once had investments and manufactures in Ukraine, Czechoslovakia, etc -- now they had little access to these economies
So Germany imported labor where Japan exported work.
Sources:
'From Noodles to Satellites': The Changing Geography of the Japanese sogo shosha
Factor Proportions, Human Capital and Foreign Trade: The Case of West Germany Reconsidered