In psychology, the Fundamental Attribution Error is attributing the behavior of a group of people to personality traits or characteristics of the people rather than to an external cause such as a situation.
Other terms include: correspondence bias and over-attribution effect
For example, considering
slaves to be ignorant or dependent instead of recognizing the system of slavery
used the force of law and punishment to withhold education and freedom to live
as they wished.
Reference
Jones, E. E., & Harris, V. A. (1967). The attribution of attitudes. Journal of experimental social psychology, 3(1), 1-24.