I read that in the 90s, Japan was offering up to 3000 USD to Japanese-Brazilian immigrants to leave the country. Considering these people were literally ethnic Japanese themselves, yet still seemingly unwelcome, I'm wondering why Japan has retained its xenophobia and closed off nature, whereas Germany (which was a literal Nazi state only 75 years ago) did a total 180 and nowadays has the highest percentage of migrants, relative to native population, in the world
"nowadays has the highest percentage of migrants, relative to native population, in the world"
So there is a good history of postwar immigration to the Federal Republic of Germany that an expert on modern German history hopefully will write, but I want to provide a little context because phrases like this are kind of misleading.
To put it simply, people misunderstand bureaucratic terminology. The German Federal Office of Statistics counts residents of Germany with a "migration background" (Migrationshintergrund), and this population includes, according to the official definition both people born abroad, and those residents/citizens of Germany who have at least one parent who was born abroad as a non-German citizen. So someone born in Germany and living there all her life could be counted as having a "migration background" because one of her parents was born abroad and immigrated to Germany. To put this in numbers, some 19.3 million Germans have "migrant background", but out of these some 13.2 million actually immigrated to Germany.
If that sounds weird, other agencies have other, comparably misunderstood terminology. The United Nations Statistics Division, for example, discusses "immigrant stock", and this definition includes not only foreign-born persons who immigrated to a country, but native -born persons who moved abroad and then returned.
Anyway, back to German statistics. It's important to understand a bit who many of these immigrants to Germany in the postwar years. The Federal Statistics Office notes that it does not include persons displaced from the Second World War in its categorization (which is a huge number by the way), but does include so-called "late resettlers"(Spätaussiedler). These are ethnic Germans from different communities in Eastern Europe (Hungary, Yugoslavia and Romania come to mind) who were allowed to emigrate in the Cold War years - often the Federal Republic of Germany outright paid these countries' governments in order to allow this to take place (according to Robert Service, as late as 1986, the Federal Republic was paying 25,000 deustchmarks per person to the Ceausescu regime in Romania for 5,000 ethnic Germans to emigrate every year).
Also included in this figure are the hundreds of thousands of ethnic Germans (including but not restricted to "Volga Germans") who were allowed under German law to emigrate from Russia, Kazakhstan, Ukraine and other former Soviet states and settle in Germany in the 1990s under a German "right of return". To give a very specific case, Volga Germans were deported by the Soviet government from their autonomous republic on said river during the Second World War, and forced into internal exile in the Kazakh Soviet Socialist Republic. According to the 1989 Soviet census, over 900,000 ethnic Germans out of some 16 million people lived in the republic - almost 6% of the population. By the 1999 Kazakhstani census, that total number had dropped to 350,000, and it has continued to fall - most of this is from emigration to Germany. These former Soviet immigrants to Germany and their children are counted as Germans of migrant background. It's estimated that of all Germans with migrant roots, some 7 percent have Russian roots, some 6 percent roots from Kazakhstan, and some 4 percent roots from Romania (some 14 percent have roots from Turkey for comparison). Update: a 2016 German government report estimated that a total of 2.4 million "late settlers" had come from the former USSR, out of an Aussiedler total of 4.5 million.
So let's go back to that German of "migrant background" I used as an example earlier. Maybe her mother's family has lived within the current borders of Germany for centuries, but her father is a Volga German from Kazakhstan who immigrated in the 1990s. She will technically be a German "of migrant background" even if she was born in Germany.
A final point: it's worth remembering that EU citizens have a legal right to enter Germany, and look for/take employment and residence there (Germans have the same rights as regards to other EU members). There's something like 4.6 million people from EU member states living in Germany. Admittedly in some cases (I'm thinking especially with regards to Croatians) this category includes some immigrants to Germany who moved there before their home country became an EU member (or even an independent country), but it's worth noting this nevertheless, especially as the Federal Statistics Office notes that most of this category are relatively recent arrivals.
Now I don't want to say that the question's premise is wrong, because Germany has had much more immigration compared to Japan since 1945. I mostly want to mention these things because headlines and statistics about migration to Germany get misinterpreted for political ends a whole, whole lot. That's not necessarily happening with this question, but I really wanted to mention these definitions as some context.