Please see Ezra 10:2.
Many jews had not intermarried, but Shechaniah had not. However, he said “we have sinned” in order to avoid embarrassing the sinners? Shechaniah learnt this from Moshe or Yehoshua according to the Gemoro Sanhedrin 11a.
If this is such an important lesson, why does the book end by listing many if not all the sinners?
The families that sinned and caused themselves issues regarding the heritage of their children is something that has to be mentioned to prevent others from marrying into those families, however when it was only an issue of confessing to H-shem, then it was proper to hide the identity of those who sinned.