Did the priests/elders in that time carry out these punishments for said sins?
Of course they did! Not only did the priests and elders do it, but the people of the community were also commanded to do it. Read what it says in verses 4 & 5 above:
“[4]
If the members of the community close their eyes when that man sacrifices one of his children to Molek and
if they fail to put him to death, [5]
I myself will set my face against him and his family and will cut them off from their people together with all who follow him in prostituting themselves to Molek.”
They were killing their own children as a sacrifice to honor a false “god” (demon) (abortion, anyone?)! What would you expect God to require as punishment for that? God is teaching them that anyone who commits any of these acts, are defying His Law. He doesn’t give them these laws out of any intention of being cruel, but to keep them from destroying themselves. All of these sinful acts have serious consequences, both in the lives of the individuals involved, and in the entire society at large. They are a detriment to society.
Most people in those days followed those laws out of fear of the punishments, so they probably didn’t have to carry out that sentence too many times before the people learned not to commit those sins. The Bible says, many times, that “they were a stiff necked people”. In other words, they were thick headed and stubborn, so they needed a stronger hand to keep them in line.
I know of course Jesus asking them to cast the first stone if they be without sin, so I don’t understand how this teaching in Leviticus is from God.
You have to remember that Moses lived thousands of years before Jesus did. People of that time were far less educated, and they lived a much different kind of life than they did by the time Jesus came into the world. So, God had to treat them differently because they were much more crude than people were at the time of Jesus. Similarly, the people that lived in the time of Jesus were much more crude than people are, today. God understands this and adjusts His teachings according to the people’s ability to understand them. The punishments for breaking the Laws of God might change according to the development of the people, and what they are capable of understanding, even though the principles of the laws, themselves, remain the same (Thou shalt not kill, etc.).
We also need to keep in mind the reality of the
spiritual punishment for our sins. The punishments we might see in this temporal world are a reflection of those we may see in the next. That is the main purpose of having punishments attached to sin in this world, because if we are not punished in this world (or refuse to do penance), there will be a much worse punishment in the next.