Your question asks about the sociological reasons for racial discrimination, which, before answering, I want to expand upon by distinguishing them from the psychological reasons for discrimination. While psychological reasons for discrimination can be generalized and applied to understanding discrimination of all kinds and against all racial groups, the sociological reasons for discrimination are dependent on context and history, and differ for each racial group.
Psychological reasons for discrimination come from built-in human biases. For example, humans tend to perceive people within their own racial (or other!) group more favorably than those outside of their racial group, and tend to give people within their own group preferential treatment. This bias is called the in-group bias, and is one of many types of biases that lead to racial prejudice--irrational, negative judgments based on stereotypes of people from other racial groups. Prejudice, in turn, leads to discrimination, the preferential treatment of one racial group over another. While prejudice is a mental state, discrimination is an action.
These psychological reasons intersect and combine with the unique historical and sociological circumstances of each oppressed racial group and its oppressors. While the biases that make up the psychological reasons for discrimination might be common across all humans, the sociological reasons for racial discrimination differ between, for example, African-Americans, Latinos, and Jews. In the case of African-Americans, for example, sociological reasons for discrimination are informed by the history of African slavery, Jim Crow laws, class-based rivalry between poor whites and poor blacks, the war on drugs, and the prison-industrial complex. This history provides the backdrop for racial discrimination that continues today.
Each of these groups’ histories, and each of the historical circumstances mentioned above merit their own answers (if not their own books!), so I will attach some further resources for you. Thanks for a great question!