plenty of reasons...
varying from someone being misinformed about a community or hatred because some particular section of a community did something and now the whole community is being stereotyped.
Media plays a big role. After 9/11 in america channels constantly showed muslims on channles and this lead to hate crimes against muslims as well as sikhs because americans could not distinguish between them.
Can also take the form of discrimination against color or sexual orientation.