I think that's reversing the cause and effect a bit? I'm not saying immigrants go to cities for Democratic policies, but that cities tend to lean Democrat partially because they are full of diverse immigrants from different places and backgrounds. The Republicans over the last few decades took a measured approach to both focus on rural voters and also project a USA-first image that can at times be seen as anti-immigration. The Democrats took advantage of that to solidify their grasp on urban areas.