Why throughout history horrible " laws" have been enacted in order to please a bunch of people who wanted to exploit another group of people?

Consider how it was " legal " to own slaves . Consider how it was " legal " to ask black people to give up their seat to a white rider . Consider how until recently , South Africa had a system of institutionalized racial segregation . Consider all the anti Jewish legistalation that existed in... show more Consider how it was " legal " to own slaves .
Consider how it was " legal " to ask black people to give up their seat to a white rider .
Consider how until recently , South Africa had a system of institutionalized racial segregation .
Consider all the anti Jewish legistalation that existed in Germany .
Consider the " white Australian policy "
Consider how is legal to abort kids in the U.S. and some other nations .

Etc, etc I could provide many other examples ! I know in Muslim nations they have also had their share of horrible laws against Christians , Jews , women , homosexuals etc

Why is that throughout history , horrible " laws " have been enacted just to please people who had ( have) their hearts full of hatred towards other people ? How could lawmakers who are supposed to be rational , listen to such people ?
6 answers 6