Slavery was legal. Segregation was legal. Never use legality as a guide to morality.