Ah then, agreed!

In Canada, the historical record shows that Sir John A. MacDonald was a racist. Much like Robert E. Lee and other southern white Americans, MacDonald clung to that racism even though he knew it was morally wrong. He rationalized his racism, believing that it was for the good of society as a whole. (The Chinese not being sufficiently civilized, you see.)

In broad terms that rationalization is, "I'll commit a lesser evil in order to prevent a greater evil occurring." That thinking may sometimes be justified in the very short term. But in the long term no one is sufficiently prescient to know if the greater evil would occur, or if the lesser evil truly is. That's why human rights principles must prevail in public decisions, even at great cost.