1-4 Ezra was approached and made aware of a problem, specifically that some of the exiles had intermarried and had not separated themselves from people of the land (idolators).
God had already commanded them to not intermarry with people who were idolators and practiced abominations, worshiped other gods, etc, because it would lead them astray. This was not new. However, the exiles didn’t keep separate during the exile and upon their return, brought these people, and more importantly, brought their pagan beliefs and practices, with them.
It wasn’t so much that they intermarried with others, but that they conformed to the pagan lifestyle rather than their foreign spouse conforming to the beliefs of the Israelites.
And it was the leaders who committed this sin.
The imagery is really good in verses 3-4. Upon hearing this, Ezra tears his robe and pulls out his hair and sits down appalled until evening. And he wasn’t alone in his actions, others gathered around him.
He was so completely upset and disillusioned and maybe disgusted with the lack of spiritual health in the exiles that he just….sits. He is also a bit fearful too of what God might do because of this great sin. I’m not sure what he does as he just sits for hours. I’m sure he is thinking about things, probably trying to figure out how to make it right with God. He doesn’t go to God up front, he waits.
At the evening sacrifice, Ezra finally prays to God. He takes on the guilt and shame for all the exiles in his prayer. He bears the burden before God. He doesn’t offer excuses to God but acknowledges the sin and guilt. At this point, what else can he do? God knows all anyway. They were exiled for their sins and disobedience, then they return from exile just a remnant and keep on sinning.