The question appears to conflate racist and non-racist attitudes with the popularity of immigration destinations, which is a bit of a non-sequitur.
The history of America reveals it to be both highly racist towards Native Americans, Africans, Asians, Jews, Italians, Irish, Mexicans, etc., and yet still remains a popular destination point for immigration in spite of it.
The fact that it is a popular destination for immigrants does not mitigate its systemic and prolific history and expression of racist attitudes towards a wide variety of races, religions, genders, and ethnicities.
The question implies an either/or premise when both possibilities are true. America is inherently racist and yet remains popular to immigrants seeking better lives and futures for themselves.
This seeming dichotomy can be further broken down by weighing the degree of racism prevalent in American attitudes versus other possible immigration destinations. Yes, America is racist but far less so than other immigration destinations.
For instance, Chris Mathews the former MSNBC anchor often pointed out that an Anglo foreigner might migrate to Japan but would never be accepted as native Japanese. Likewise, were they to move to Germany, France, Spain, China, Russia, or other countries they would not be considered natives of that country for generations to come. If ever.
However, in America, despite its deplorable history, national assimilation is much more possible than in these other countries. So now we're talking about racism relative to other destinations. This proves the point that America is decidedly racist but arguably less so than other alternatives and therefore understandably more popular.