We can do some scene-setting here to get a fuller picture of how this passage plays out.
Back in 586 BC, the Judeans were conquered by the Babylonians. For several years, Judean kings had played one large empire off another -- if the Egyptians invaded, they howled for the Assyrians, but if the Assyrians got a little pushy then they howled for the Babylonians. And so on.
Eventually, the Babylonians got fed up with this dance, besieged and destroyed Jerusalem and carted all of the leaders of Judea off to Babylon. There they stayed for many years, until the Persians conquered the Babylonians. They didn't care one way or another about the Judeans and left them where they were in Babylon, but eventually the Judean leadership asked the Persian emperor if they could return home. When he agreed, they went back to Judea and found Jerusalem and other major cities in ruins. Nehemiah was the governor and Ezra the high priest, and under their leadership the people rebuilt the city, the city walls and the Temple.
We join them as they hold a great feast to celebrate these accomplishments. Ezra and the other priests are going to read what we know as the first five books of the Bible. The Judeans called it "Torah," or "teaching." It contained the Law of Moses, or the commandments that God gave Moses at Mt. Sinai. They were also going to explain it to the people, many of whom had been born in Babylon and spoke Babylon's Chaldean language better than the ancestral Hebrew in which the Torah was written. For most of these folks, this may have been the first time they encountered the Torah in a way they could understand it.
And when they did understand it, we see they respond with great sorrow. They realize how their ancestors failed to obey God's laws about true worship and how to act like God's people. They hadn't treated each other the way God told them to, and they hadn't worshipped God alone as the first commandment directed. But they also realize how they hadn't kept Torah either. They can't celebrate knowing how they have failed God!
No, say Ezra and Nehemiah. They can celebrate because now they know the law and they can obey it! Before, if they'd done the right thing according to the Torah, it was by accident because they had no idea it was the right thing. Now they can do the right thing in order to show others they are God's people, and to show God the proper respect and thanksgiving. Now is not the time to be sad over failure, it's the time to rejoice over the chance to succeed!
We may come to an understanding of our own sin with the same attitude the Judeans had. When something uncovers God's will before us and we see it clearly, we may be sad because we know how far astray we've gone. We may even fear the consequences. But should we?
Ezra and Nehemiah would tell us no. Because we also know how we can return to following God. If God's standards are real enough that missing them saddens us, why then wouldn't his love be real enough that we can accept his grace? The Judeans said, "We failed to live like God's chosen people!" Ezra and Nehemiah said, "But we are still his chosen people! Now we can return to his ways!"
We might say, "We have failed to live as God called us to live! We have turned away from God!" But in the cross of Christ, God says, "But I have not turned away from you. Return to me, where you were made to live and to the relationship you were made to have."
Which sounds like very good news to me.