Of course the joke mostly works because it lampshades bigoted cultural assumptions about race in Germany: a lot of Germans in the 1990s said "Afro-Amerikaner" when they meant Black (regardless of nationality, even Germans) because they thought it was more "politically correct" and the thought a Black person might be a native citizen never occurred to them. This has improved somewhat over the years but since the film was originally released in 1980, I doubt the cultural awareness was any better at the time.
To be clear: I'm not saying the joke is bigoted, I'm saying the joke worked because it played off bigoted assumptions.