New Living Translation (NLT)
Punishments for Disobedience
20 The Lord said to Moses,2 “Give the people of Israel these instructions, which apply both to native Israelites and to the foreigners living in Israel.
“If any of them offer their children as a sacrifice to Molech, they must be put to death. The people of the community must stone them to death. 3 I myself will turn against them and cut them off from the community, because they have defiled my sanctuary and brought shame on my holy name by offering their children to Molech. 4 And if the people of the community ignore those who offer their children to Molech and refuse to execute them, 5 I myself will turn against them and their families and will cut them off from the community. This will happen to all who commit spiritual prostitution by worshiping Molech.
Those who worshiped the god Molech, however, were known to offer human sacrifices, particularly in times of hardship. Children seemed to be the favored sacrifice, and of course, the firstborn child was preferred over other children. And this wasn't just any sacrifice, it was a burnt offering. It conjurs up imaginings of satanic rituals, doesn't it? Well, that's exactly what it was!
God was so opposed to such evil that He demanded the life of anyone who turned from God to worship Molech through the sacrifice of a child. The people of God must stone to death the person who would do such a thing, whether they were Hebrew by birth, or not. The act of human sacrifice brought shame to the name of God... In other words, it gave God a bad reputation.
That may sound like a lame way of wording it, but it's true. I have long been a member of a Christian forum or two, and it seems like at least once or twice a year, someone who has lived their life and formed their opinions of God by biblical hear-say, i.e. someone whose grasp of the Bible comes from things told them out of context by unbelievers, comes along and wants to know how a loving God can allow human sacrifice!
And the short answer is, He doesn't! He expects and demands the life of those who do such a thing, and is so adamant about it that if His people turn a blind eye and do nothing about it, God will bring down severe punishment on them for ignoring it.