Racial minorities are typically more reliably Democrat, but if you consider Latino immigrants... they often times come from very Catholic and conservative backgrounds. They aren't all liberal.
What's worse, restricting immigration so you can keep the population majority white and give Republicans a chance to win elections, or allowing for more immigration which might benefit Democratic chances? The first option seems racist to me.
I don't think Democrats are trying to allow for more immigration just to improve their chances in elections. But it's obvious that Republicans are trying to restrict minorities from voting with their legislation.