Why did God sometimes set laws in the Old Testament that current Christians would now see as immoral?
Couple of things to remember.
1. God did not give his revelation all at once. It developed as humans were better able to understand His revelation and it continues to develop to this day. The Old Testament is a foreshadowing of the New Testament. It was to prepare His people for the coming of Jesus
2. God did not demand His people to live to his standard all at once. In his mercy, God started where people were at, not where his justice demanded them to be. An example...
People naturally want to beat their enemies to the first punch. “Im going to get him before he gets me” It is also natural for people to want to hit back harder than they have been hit. This is really were the people were at during the Old Testament. God ratcheted things up when he set the standard to an “eye of an eye”. Is an “eye for an eye” the full revelation? Nope, but God did not call His people to make quantum leaps that they were not going to make. Jesus ratcheted up the standard again when he asking us to love our enemies. Our society does not live up to this although this is what God is calling us to do. This is such a high standard that it is still hard for us to understand.
If you look at the Old Testament it is really a dialog between God and his people. God calls them to something that is closer to him and the people try and fall away. God then calls them back and they try and they fall away. This happens over and over. But the morals standards in the Old Testament that you are having an issue with are a step closer to God’s justice. Did God’s justice change, no God still and always has demanded perfect justice, but through Jesus’ cross he was also able to bring mercy, without it no one can be saved.