Some of the worst racist tragedies in history have been perfectly legal.