Scientific racism can be seen as a reaction to the decline of European social stratification. The classification of people by race supplanted the feudal classification system. With the aid of new systems of scientific classification (Linnaeus), European “thinkers” set out to classify humans based on race. Improvements in sea travel offered exposure to people of different continents. A number of factors came together to contribute to scientific racism, which had become mainstream science by the late 19th century.
The concept of the nation, or people, was closely connected, and the culmination of this trend was 20th-century fascism and genocide.
All systems of classification represent attempts to reduce complexity.
Len Platt, in Joyce, Race and Finnegans Wake, argues that scientific racism served to justify continued (or even worsening) social inequality after the Enlightenment (Platt references the historian Leon Poliakov). I think there is some truth in that–and racism is used for that purpose today–but the more fundamental issue is the reaction against the erosion of the feudal system of stratification. Racial classification offered a new form of stratification. Ultimately, however, functional differentiation should be more powerful, and functional differentiation is blind to race. It’s also blind to nationalism.