Jesus says in Matthew 18:6-7 and Luke 17:1-3, that anyone that causes the children (of Israel) to sin should have a millstone tied around their neck and cast into the sea. This implies that tempting others to sin is worse than sinning against God or them.
Luke 17: (NLT) 1 One day Jesus said to his disciples, “There will always be temptations to sin, but what sorrow awaits the person who does the tempting! 2 It would be better to be thrown into the sea with a millstone hung around your neck than to cause one of these little ones to fall into sin. 3 So watch yourselves!
In Numbers chapters 22-24, a wicked prophet named Balaam was hired by the Moabites (and Ammonites as implied by Deut 23:3-4), to curse the Israelites. However, God is too powerful for any man to overwrite, so Balaam could not curse whom God has blessed. Balaam ended up blessing the Israelites three times, and on the third time, he cursed Moab. This was all God’s doing and Balaam was powerless. The Moabite king was upset with Balaam and was willing to pay him very well. It must have been quite a lot of money considering that later on in Numbers 31 we find out that Balaam did reveal away around God’s blessing and shared that info with Moab and Ammon. Balaam realize that the blessings and promises of God are conditional, so the Israelites had to keep God’s commands in order to inherit the blessing. Breaking their covenant exposes them to the curse. Balaam then told the Moabites to use women (shrine prostitutes) to seduce the Israelite men into worshipping their sex idols at their temples. This would cause them to be under the curse (which we get more info on in Deut ch. 28).
The Moabites and Ammonites did this, but they must have been warned not to use their own women because of the condemnation associated with tempting God’s people. So they used Midianite women to do so in Numbers ch. 25. This strategy worked since it caused a plague to break out in the Israelite camp that killed 24,000 Israelites (Num 25:8-9). In Numbers 31 God sends the Israelites to destroy the Midianites as punishment for what they did. God also punishes Moabites and Ammonites by limiting their ability to intermarry with the Israelites. Deut 23:3-8 says that Moabites and Ammonites have to wait for 10 generations to intermarry with Israel because of their temptation with the Midianites. Meanwhile, Egypt and Edom have to wait for three generations since they actually did treat Israel well at one point and only sinned against them later with slavery and war. Causing God’s people to sin is considered more grievous than sinning against them, so the Midianites, Moabites, and Ammonites got a harsher punishment than Edom and Egypt.
This seems a little harsh, after all, Deuteronomy chapter 2 tells us that because Moab and Ammon are related to Abraham through his nephew Lot, they were promised land in Canaan as well. God used them to defeat some of the Rephaites (Giants). Moab defeated the Emites and Ammon defeated the Zamzummites. God gave the Israelites Abrahamic relatives victory over these giants. Israel’s brother nation Edom, (descendants of Jacob’s brother Esau) also conquered some Canaanites known as the Horites. God told the Israelites not to fight with Ammon, Moab, or Edom because that land was their inheritance (Deut 2:5,9, & 19). God gave Israel’s relatives favor in conquering the inhabitants of the land and Moses most likely reiterated this in Deuteronomy 2, to encourage the Israelites to take the land. They were to trust that if God can give their heathen relatives victory over giants then surely they, descendants of the promised seed of Abraham, Isaac, who passed the blessing to them through Jacob their forefather, will have victory.
In Jewish culture, even today, a person born as a bastard or illegitimately (from adultery, incest, or from a harlot) would not have been circumcised or allowed to marry an Israelite woman, or inherit anything from their Israelite father, so they are simply treated like a gentile. This is explained in Deut 23:2 and this rule was applied to the Moabites and Ammonites for 10 generations in the next verse (Deut 23:3). Ironically, Moab and Ammon themselves were born of incest between Lot’s daughters and himself (Gen 19:30-38). Anyway, these restrictions on foreigners only apply to their men marrying Israelite women. Gentile women like Ruth (a Moabite), are not prohibited from marrying into the Israelite nation. Ruth is King David’s great-grandmother and has her own book in the Bible. In addition, she is even in the lineage of Jesus (Matthew 1:5), all of this is true despite the fact that she is a Moabite. In addition, the restriction on promoting the welfare of Moab and Ammon in Deut 23:6 was not applied to individuals like Ruth or any Moabite or Ammonite man who was willing to live among them for 10 generations in order to merge with them, but rather to their nation-state and government. Edom and Egypt have much lighter restrictions in Deuteronomy 23:7-8, because of their relationships with Israel in the past, Edom is Israel’s brother (Jacob and Esau were twins [Gen 25:24-26]), and Egypt allowed Joseph’s family to stay in Goshen despite the fact the Egyptian citizens hated foreigners (Genesis 43:32-34, Gen 46:31-34, Gen 47:1-12). Even though they sinned against Israel later by enslaving them (Egypt in Exodus 1), and resisted allowing them safe passage as they journeyed through the wilderness (Edom in Numbers 21:18-20), they didn’t cause Israel to sin as Moab and Ammon did by using Midianite prostitutes to seduce them into idolatry.
Back to the Midianite’s punishment, when the Israelites attacked Midian they were instructed to take out everyone and only spare the virgin women. Why were the Midianites punished so harshly? Let’s take a look at how God dished out punishment to the nations at the time. In Deuteronomy 20:17 seven specific groups are named, the Hittites, Amorites, Canaanites, Perizzites, Hivites, and Jebusites. In Deut 20:10-18, they were told not to make peace with these local Canaanite nations and to wipe them out in order to avoid copying their practices. Meanwhile, for non-Canaanite nations that were further away, they could offer peace and subjection and only were to fight if that nation refused to submit. When fighting faraway nations, they were told to kill only the men and they could keep the plunder and livestock, as well as the women and children as captives. However, they were to kill everyone among the local Canaanites (that didn’t flee and leave the land), both humans and livestock (the livestock was likely defiled in some way). The Canaanites were explicitly being judged by God through Israel’s actions and those that didn’t flee from the land would have been executed. This condemnation of Canaan for their sins is why God gave Moab, Ammon, and Edom victory over the Canaanites.
The Midianites are not Canaanites so normally any war with them should have allowed the women and children to be spared. However, that didn’t happen here and they were treated like Canaanites. This whole battle only happened because Midian seduced Israel, and this was their punishment from God in response to what they did. God did not have Israel go after every Gentile nation only Canaanite ones. Remember as stated above in Deut ch.2, nations related to Abraham like the Moabites, Ammonites, and Edomites were off-limits because God blessed them with their land allotments because of his promise to Abraham’s children. The Midianites were related to Abraham because Midian was a son of Abraham from his second wife Keturah (Gen 25:1-4). Moses’ first wife Zipporah was actually a Midianite, and when he became fugitive in Egpyt he fled to Midian, and the high priest Reuel/Jethro (Zipporah’s father) is the one that took him in. This is why their punishment was limited and a remnant (of virgin women) was allowed to survive. The remnant of virgins was spared because they had not learned the Midianite pagan sex practices and were not involved with the seduction of Israel. The boys were likely killed because boys are more likely to want to avenge their families especially if they don’t have their mothers. The boy’s mothers would help subdue them to this new culture by marrying the Israelite men and giving them stepfathers. However, mothers aren’t virgins so they would have been wiped out, this leaves prepubescent girls and maybe some virgin older women. The Midianites inherited the punishment of Canaan, but God had to spare some remnant of them for Abraham’s sake. Lastly, since Moses’ first wife was a Midianite and they took care of him while he was a fugitive from Egypt, we can infer that he didn’t say he said because he hated Midianites, God command this because of what they did specifically.
God was keeping his promise to Abraham while also executing judgment because God has to balance mercy and justice. We see that when he spares Noah’s family in the flood in order to preserve his promise to Adam to save humanity (Genesis 6-9). He rescues Lot from Sodom when Sodom and Gomorrah were condemned for their sins (Gen ch. 19). God prohibited Moses’ generation from entering the promised land because of their doubt and rebellion (Num 14:26-45), however, he preserves the next generation of the Israelites in order to keep his promise to Abraham that they will inherit the promised land. Furthermore, this event is clearly targeted at a certain faction of Midianites that was involved with the temptation of Israel’s men, since there were plenty of Midianites left to challenge Israel in Judges chapters 6-7, which is many years later, so not all Midianites in the whole world were targeted, plenty of the men either escaped or there was a remnant of men that were living apart in a different location.
Essentially, the Midianites had the Canaanite’s condemnation transferred to them, but a remnant was spared for the sake of Abraham. We can also see this “transference of the punishment” concept with Achan’s family in Joshua 7. In Joshua 7:16-26 a man named Achan took some silver and gold from the plunder of the conquest of Jericho, even though the Israelites were explicitly told not to and he and his whole family got wiped out. He violated the command in Deut 7:25-26. This command was, “Do not bring any detestable objects into your home, for then you will be destroyed, just like them…” This implies that God will view anyone who violates this command as a Canaanite and that meant they will inherit the Canaanite punishment of having their whole family wiped out.
Jesus gives insight on this principle in action in the new covenant in Revelation 2:20:
Rev 2:20 “But I have this complaint against you. You are permitting that woman—that Jezebel who calls herself a prophet—to lead my servants astray. She teaches them to commit sexual sin and to eat food offered to idols. 21 I gave her time to repent, but she does not want to turn away from her immorality.
Check out this insight into God’s judgment from Ezekiel 18:23-24. Ezekiel 18:23 says, “Do you think that I like to see wicked people die? says the Sovereign Lord. Of course not! I want them to turn from their wicked ways and live. 24 However, if righteous people turn from their righteous behavior and start doing sinful things and acting like other sinners, should they be allowed to live? No, of course not! All their righteous acts will be forgotten, and they will die for their sins.”
God wants repentance from sin, and he wants to show mercy but we must come to him and ask for mercy and intend to do what is right by reconciling with both God and the humans whom we offend. This is why in Matt 5:23-24 Jesus said that when an Israelite gave a sacrifice, they should apologize to and reconcile with anyone they have wronged. His point was that sacrifices shouldn’t have been given cold and ritualistically with no heart and that people should be mindful of their sins and repent when giving sacrifices. We must repent in order to receive mercy (1 John 1:9). Hebrews 4:16 says to “come boldly to the throne of grace so that we may obtain mercy”. The boldness to come to God for mercy in our failure comes from the confidence, faith, and trust that he loves us. We shouldn’t hide in our failure like Adam (Gen 3:8-11) but come boldly to ask for mercy like David (2 Samuel 12:13-25, Ps 51:1-19).
The moral of the story is this, tempters like Satan get the worst punishment because they are like their father (Satan). We should avoid being the tempter in any situation since there is a worse judgment for the tempter than the tempted. If we do commit this sin there is still mercy because of what Jesus did for us when we repent.