It’s an age old tradition, but it’s not and arbitrary group it’s always a minority group. Maybe it’s the Jews, maybe it’s a certain ethnicity, maybe it’s just a political ideology.
The easiest thing to rally people around is the excuse that it’s the outside group that’s ruining your country.