Probably money, but that doesn't exclude the obvious racism it created.
This! In history, a lot of racism has been created to justify wars, economical exploitation, slavery, creating political scapegoats and so on.
Demonizing an enemy is the most basic method to polarize people. This type of "psyops" was extremely common during WW2.
People often don't really want to look at the root of racial, ethnic, political discrimination because it has to do with economic and political power.