Some politicians and certain parts of the media are blaming immigration for all of those issues. There's a constant barrage of talking points on the news and other forms of media. They cut through complex issues and appeal to 'common sense'.
People are directly feeling the pain. People are being given a reason for the pain. People feel that reason is the direct cause of their real pain.