I think the problem here is absolutising a commandment even if it harms another person. Jesus said the whole of the Law and prophets was summed up in loving God and loving neighbour. That means that these two commandments take precedence. Jesus showed this in the way he violated sabbath laws (the third/fourth commandment) to save life. Likewise, the law prohibiting stealing doesn't apply when following it directly violates loving God and neighbour. An example might be if someone is destitute and about to starve to death, then they would be justified in stealing from their rich neighbour under certain circumstances. As Aquinas puts it:
Hence whatever certain people have in superabundance is due, by natural law, to the purpose of succoring the poor. For this reason Ambrose [Loc. cit., Article 2, Objection 3] says, and his words are embodied in the Decretals (Dist. xlvii, can. Sicut ii): "It is the hungry man's bread that you withhold, the naked man's cloak that you store away, the money that you bury in the earth is the price of the poor man's ransom and freedom."
That may be so but it doesn't really answer the question - if all killing of human beings is wrong (even in self-defence or the death penalty), how could God command the Israelites to do something wrong?
I think that's very unwise. God wants us to struggle with Him, especially in areas of moral quandary. If God commanded me to do something highly immoral, I'd definitely argue back.