It's strange in that a country close to the so-called "melting pot" of the US is so uniformly one race ... Mexicans. Oh yeah, it has people who are more Spanish and those more Indian ... but Mexico is absurdly composed of pretty much Mexicans.
There were some signifanct American Immigration into Mexico before 1860 but not much since.
At the time African-Americans had a hard time immigrating anywhere.
So don't see how that affects anything.
China is uniformly of one race.So is India. etc etc.
Rich countries, with the the exception of Japan, tend to be multi-racial because they attract immigrants.
Poor and Middle Income countries create emmigrants.
Unlike say Cuba and Brazil slavery in Mexico was banned before it got started so there was never a significant population of African slaves.
If African slaves managed to make it to shore off Cuban or Brazilian ships they would be granted unofficial asylum and could stay. That is why there are a few Afro-Mexicans.