Those laws are immoral according to God. Just like the laws supporting abortion.
okay ...now you have my attention....
what does being an illegal alien have to do with abortion?
Does your Christian charity extend to, say, 40 million Muslim immigrants ?
And the 'alien' in ancient Israel was expected to obey all Jewish laws. He didn't have the 'freedom of religion' to set up an altar to Asherah or Mircom. Ruth the Moabitess became a practicing Jewish convert.
And I do remember in Ezra and Nehemiah how the returning exiles from Babylon were demanded to divorce their non-Jewish wives.