zra found himself in quite a quandary when he got to Jerusalem. The Jews there had taken for themselves wives from among the idolatrous Canaanites. They were in direct disobedience to God and were therefore in a great deal of danger. Ezra got upset... really upset. Then, he prayed. It was then that an acceptable solution was proposed. A man named Shechaniah stood forth and suggested that the Jews should divorce their heathen wives.
Now, you might ask, how could that be a good solution? Although the wages of sin... all and any sin... is indeed death, some deaths come more quickly and viciously because of the severity of the sin. And, although hell will be torturous for all its inhabitants, it will not be equally torturous for all. All violations are violations, but not all violations are equal. Deuteronomy 7:3 & 4 and Joshua 23:11, 12 & 13 tells us that God hates idolatry and that He strictly forbad the Jews from intermarrying with the idol worshipping people of Canaan. So, what was Ezra to do when he found that the remnant of the Jews (who had returned to Judah prior to his arrival there) had freely intermingled with the Canaanites?
Ezra took Shechaniah's advice and required the people to purify themselves from the unbelieving heathen of the land... even the ones they were married to. And, the people not only went along with that idea, they went for it passionately, believing that God would bless them for it (Ezra 10:14).