Most minor instances of discrimination result from natural human instincts to feel more comfortable around other people with similar traits. Discrimination can also result from ingrained beliefs in society that people with certain traits are inferior in some ways.
Discrimination sometimes occurs when a group in power wants to protect its turf. Those in political power in some countries have used discrimination and segregation to hold their power positions. Discrimination against women sometimes stems from the desire of men in an organization to maintain the status quo. In some cases, people discriminate against others based on the perception that their lifestyles or behaviors are immoral.