"What has happened to us is a result of our evil deeds and our great guilt, and yet, our God, you have punished us less than our sins have deserved and have given us a remnant like this."
Although God always disciplines his children, he has always been merciful and lenient. Ezra is speaking from a context of post-exile. The Babylonians came into Jerusalem and conquered the Israelites, but they did not slaughter all of them as would have been custom, rather some were taken to Babylon and served in the High Courts (like Daniel). Nonetheless, the sheep had been scattered so that the land could sabbath. When you think of all the ancient kingdoms that used to exist and how no remnant of them even remain, you begin to see God's providence in sustaining his chosen people, the Jews, throughout history.
It's no secret that the Jews have been one of the most persecuted people groups in all of history, and yet they remain because God is faithful, merciful, and just. And now, because of Jesus Christ, God's promises to the Jews have been extended to all the nations (namely us) because Christ has become the Blessed One through whom all are blessed, the perfect Jew and the seed of Abraham.
God will be faithful to his people who by their faith that God can do what he said he would do (and has done) will enjoy everlasting life and will surely not perish. Do you believe it?