I live in Japan and visiting Americans do this all the time. Many people just did a find-and-replace on their speech years ago and never consider what it actually means.
What’s funny is when you have people call foreigners “outside country people” (if you’re a foreigner in East Asia) but there is a funny transition where if they visit the US they still refer to ex. an American in the US as an “outside country people.”
So, let me introduce you to my ‘waiguoren’ friend here in LA. Right, the local is the foreigner.
Do they really refer to themselves as Africans and not Kenyans or whatever tribe they belong to? "African" isn't a race, the people from that continent are way too diverse for that.
And since it is a place and not a race there are plenty of white Africans out there, same as there are plenty of black Europeans out there. Calling people who have never been to Africa "African American" just because they skin is dark is just plain racism. They are dark skinned Americans and has nothing to do with Africa.
If they are in a place with a really small minority of their population, they band together as African. If they go to a place with relatively larger sizes, they tend to go by their nationality. Never have I met an African who goes by their race or by the colour of their skin.
But white people from Africa also call themselves African. People rarely refer to themselves by their race, anyone can see that they have dark skin, so they just say which region they are from.
If you think it is wrong for white Africans to call themselves Africans then how can white Americans call themselves Americans? Similarly when I talk to dark skinned people in Europe they call themselves Europeans and not Africans. When they talk about their "race" they say they are black or brown, because that is the only thing separating them from the other people.
Did you even read my last line? No African I've met goes by the colour of their skin as part of their identity. They go by nationality first, followed by ethnicity, which is often tied to their language, and even that tertiary identity is sparingly used.
Dark skinned people from Europe are Europeans for all means and purposes, just as white Africans are Africans for all purposes. The "race" that you mention is a very recent development, and is an American export that is mostly confined to Europe alone (and mostly Western Europe). The Africans I've met and worked with often fumed at the whole colour-based distinction. They would rather be identified by nationality, and then language-based ethnicity (Zulu, Xhosa, Amheri, etc). And no, it's not that "anyone can see that they have dark skin", there are pretty clear racial distinctions based on skintone too (light-brown vs dark brown, which was part of the basis for the Rwandan genocide).