This is debunked every time it's brought up. The "trouble makers" you're referring to are local. It is not in fact the case that San Francisco mass-imports its downtrodden.
https://cis.org/Arthur/Honduran-Migrants-and-San-Francisco-D...
Here is the mayor apologizing for saying it. Not because it isn't true, but because you aren't supposed to say it out loud.
https://www.latimes.com/california/story/2022-10-20/san-fran...
As a Canuck, immediately I thought "But Texans will shoot criminals".
True or not, the belief is there for many. That does have some power. maybe.