God is goodness itself. Because he acts completely in line with his good nature, God does good to all his creatures, but especially he does good to his people, even using suffering to bring about their good. God also must make us good. He does so by teaching us his word. And to do that, he must first open our eyes to the reality that on our own, we are not good.
When Joshua the High Priest stands before God in filthy clothes, we learn that on our own we stand condemned before God. But the good news is that Jesus has taken our filthy garments on himself and paid for our sin on the cross, and he gives us robes of perfect righteousness. And not only do we stand clothed before God when we put our faith in Christ, but we live in those clothes, as we stand called to point to Christ as testaments to his great grace in our lives.