Lawful doesn’t mean right. Slavery was lawful.
Laws are not immutable. Slavery is an example of something that was lawful and then society added rules against it.
In US, the society didn't just "add rules against it". If you recall, the slavers first had to be beaten with a very big stick.
and your point is?