Num 25:3-4, 3 So Israel was joined to Baal of Peor, and the anger of the LORD was aroused against Israel. 4 Then the LORD said to Moses, “Take all the leaders of the people and hang the offenders before the LORD, out in the sun, that the fierce anger of the LORD may turn away from Israel.”
The anger of the Lord was kindled against Israel; for no sin is more provoking to God than idolatry. It is so directly opposite His nature, honor, glory, will and worship. The Lord being fed up with Israel’s idolatry ordered Moses to execute all the leaders of those who had taken part in the rituals of enticing men to sin.
God has declared in His Word that He is a jealous God and will share His glory with no one. The 2nd commandment,, ”3 You shall have no other gods before Me” (Exo 20:3-6) is elaborated compared to others because the sin against this commandment we are most in danger of. It gives glory to any creation of what is due to God only. Whatever is loved, feared, delighted in, or depended on, more than God is idolatry. ”…the preaching of the cross, by men of faith and prayer, has always been fatal to idolatry, impiety, and wickedness” (Matthew Henry), because it draws men back to the heart of worship. Col 3:5 “Therefore put to death your members which are on the earth: fornication, uncleanness, passion, evil desire, and covetousness, which is idolatry.”