The sport is not responsible for generating the behaviour of some of the fans. How could it be?
The most loyal and hardcore fans are from working-class backgrounds and those attitudes are well ingrained in the people. Even my beloved West Ham United has a history of singing anti-Jewish songs, though the signing of Isreali Yossi Benayoun (much loved by West Ham fans) prompted a lot of discussion about those songs. In my time attending football matches I've never heard the infamous monkey noises aimed at black players in any English league game, though one might occasionally hear someone shout something like 'black bastard.' We got some press scrutiny for shouting 'shoe bomber' at an opposing Egyptian player, though the media predictably overlooked the fact that it was because he had an uncanny resemblance to Richard Reid. In 2004 I was watching the England vs. Turkey match and the whole pub sang 'I'd rather be a Paki than a Turk.' It depends on where you go though. In Glasgow the local matches are marked by the old Catholic vs. Protestant tensions, in Italy some teams are properly aligned to either fascist or communist parties. It's just normal working class concerns amplified by the amount of people in one place and being on TV.
It's nothing to do with football. Football just happens to be where thousands of young men from certain localities wearing a blue shirt meet up with thousands of other young men wearing a red shirt, and the result is these sorts of things.
An Inverted Pyramid of Piffle