The railroad barron needed cheap labour and didn't give a flying fuck about the KKK clowns marching in Washington.
The elites always want cheaper labor, while the existing domestic workforce usually opposes such measures (as it obviously devalues their labor)