As far as Chinese, look at history. China is dead right in having beef with Japan, and even to this day Japan hasn't admitted to all they have done.
As for Black people, Japan is an extremely homogeneous country. Black citizens in Japan are essentially unheard of, and even black tourists are extremely uncommon in Japan. so if they rarely see us in real life, the only time they ever see us is on TV, movies and music, and that rarely puts us in a good light.
And being fair, there's a good amount of anime that shows white people as hicks, cowboys or stereotypical solders.