But for Japan, what doesn't really help is their language which is excessively hard to learn for any newcomer since it has little in common with basically any other language, as it is sort of a language isolate (chinese and korean languages will have some things in common but at the end it's a language isolate group). Island nations also generally are more succesful in controlling immigration to a certain limit.
The irony is that Chinese has more than just some things in common with Japanese, the Kanji characters.