Parenting has many pleasures and some pains. The greatest pain is disciplining our children. We love our kids and it pains us to pain them. But we know that, sometimes, it’s the only way to correct them and so prevent far worse pain for them in the future. It’s still really hard, but we know the Bible commands it and warns us of far worse consequences if we don’t.
As our Father, God has to discipline us. It gives him no pleasure, but he loves us too much to see us sinning without correcting. In Psalm 38, David was flinching under the pain of God’s correction but used the experience to teach us how to respond to correction with confession.