They don't all vote Democrats. Mexicans aren't a monolithic voting bloc. they also vote Republican, such as in Texas. They do however have a more Democratic party leaning at the moment, The Democrats have been more compassionate towards Mexicans, or perhaps its because only the Democrats try and get the vote. Yet, Many Mexicans are more conservative in terms of religion and family values than most white Democrats.
in short, It could be Democrats have shown more compassion towards Mexicans.
I vote for the Person not the political party. Although if their is a political party that is racist against Mexican people i also adjust my vote accordingly.