It's not racism. It's resentment and entirely justified. From my experience, here's how it grows:
1) Bids and proposals are submitted to American client
2) Middle management of said American client decides to go with lowest bidder (typically from India)
3) Lowest bidder can't satisfy contract due to incompetence
4) 1 year later, project still can't satisfy requirements.
5) American client back peddles to find American developers to fix and complete project
6) American developers review the code... it's a steaming pile of shit.
7) If American developers have sense, they decline the project and quote the client for the whole project
Now, if you're working in-house, the same thing happens except that you can't politely decline the project and are forced to deliver on a steaming pile of shit and you have to have your name attached to garbage.
It's not racism. Developers are objective; if it were good, quality code there wouldn't be any pushback or resentment.