Earth is a far more geologically fragmented world than Amenta, so human populations managed to develop for a while in relative isolation. Distinct ethnicities formed, and when those ethnicities met they sometimes didn't like each other. Race theory is more modern, she thinks - it's based on the idea that there are unifying, 'better' traits in certain groups of ethnicities, and that the race with those traits is better than and destined to rule over the other races. Phenotypes are the main way to tell races apart, in this, but many discriminatory laws also reference blood quantum, where some level of a single ancestor of an 'undesirable' race marks you as part of that race.
Religion ties heavily into race and ethnicity - a religion is a set of cultural practices, rituals, and beliefs that tie a people together. A few religions developed evangelical traits, where their adherents would try to spread them to others, often violently. A religion called 'Christianity' was closely tied to the national identity of this one island nation that tried to conquer the world, Britain, and that island nation was one of the main proponents and developers of race theory. Obviously including themselves as the destined inheritors of the world - the 'white' race, marked by pale skin as well as a few other traits.
The sex discrimination thing is harder to trace. It seems to be from early agrarian societies having division of labor along male-female lines, as sort of a proto-caste system. It got encoded into a few religions and cultures, even in places and situations where that sort of division of labor didn't make sense, and then developed a life of its own. By the modern day, the 'ideal' (in this particular culture) is for a woman to manage the home and children, and her husband to manage life outside the home. Of course, that's mostly a quirk of the middle class and newly rich, who can afford to have one spouse not working for pay...
Women also don't currently have the right to vote, though she expects white women will get it within the year, but that sort of systemic disenfranchisement means men have a very strong motive to keep women out of power, and white people similarly around other races, and Christians around other religions.