But neither gender nor racial discrimination arises from purely personal preferences. Instead, they reflect social codes that tell people how they are supposed to think of themselves and how they are supposed to interact with each other.