We are sinning against the Lord and we have married foreign wives for the nations of the land (1 Esdras 8:89).The problem is actually with the word I have translated as married in the quotation. The word is συνῳκίσαμεν which actually means to cohabit or to shack up.
Later Ezra tells them:
You have worked iniquity by cohabiting (συνῳκίσατε) with foreign wives and added sin to Israel (1 Esdras 9:7).The author (I am not certain that 1 Esdras was translated) refuses to acknowledge that the individuals were married (although it slips through in 1 Esdras 9:12), and so uses the verb to cohabit instead in an effort to portray the relationship as illegitimate. The sin is having any sort of relationship with a Gentile rather than the nature of the relationship. The author of 1 Esdras views being a Gentile as a greater sin than having illegitimate sexual relations. The solution proposed is for the men to divorce the women and disown their children (1 Esdras 9:9, 17-36). Even the priests are pardoned if "they divorced them and their children" (1 Esdras 9:36).
The Book of Mormon takes a different view of this sort of situation (Jacob 2:23-35; Alma 39:5).
From the apocryphal Ezra's point of view mass divorce was a better arrangement. Somehow I doubt that the wives and children thought so.