It is not clear that Ezra was calling on the people to divorce their wives. Ezra 10 does not mention divorce, but it does refer to sending away (Ezra 10:3) and putting away (Ezra 10:19) the women. Though Deuteronomy 24:1–4 permits divorce it does not require a divorce to take place. It is possible that these women could have returned to their husbands if they repented of their idolatry. The idea that marriages were broken up is an assumption that is not necessarily true.
11 Now then make confession to the LORD, the God of your fathers and do his will. Separate yourselves from the peoples of the land and from the foreign wives.”