The siege of Rabbah starts, but David stays behind and commits adultery with Bathsheba, is caught out, repents, then mourns as the resulting child dies: 1 Chronicles 20:1; 2 Samuel 11–12:14; Psalm 51; 2 Samuel 12:15–25; 2 Samuel 5:14–16; 1 Chronicles 14:3–7; 1 Chronicles 3:5–9
Confronted with his own sin, David turned to God in his prayer in Psalm 51. I believe this is where we see how David is a man after God’s own heart:
Psalm 51:11 Do not banish me from your presence,
and don’t take your Holy Spirit from me.
It wasn’t that he never sinned (because he did). It was that he sought repentance (in himself) and forgiveness (from God) when he did:
Psalm 51:2 Wash me clean from my guilt.
Purify me from my sin.
Psalm 51:7 Purify me from my sins, and I will be clean;
wash me, and I will be whiter than snow.
How was this to happen? Sacrifices might deal with the outward issues, but David knew that wouldn’t be enough:
Psalm 51:16-17You do not desire a sacrifice,
or I would offer one.
You do not want a burnt offering.
The sacrifice you desire is a broken spirit.
David knew the Law and it’s sacrifices could do nothing to his inward man. They were the expressions, not the drivers, of devotion.
What really washes away our sins and makes us (and our ‘robes’) as white as snow?
1 John 1:7But if we are living in the light, as God is in the light, then we have fellowship with each other, and the blood of Jesus, his Son, cleanses us from all sin.
Revelation 1:5, 7:14,
All glory to him who loves us and has freed us from our sins by shedding his blood for us.
… They [who died in the tribulation] have washed their robes in the blood of the Lamb and made them white.
Paul knew this, in explaining that the sacrifices reminded people of their sins rather than removed them:
Hebrews 10:3-4 But instead, those sacrifices actually reminded them of their sins year after year. For it is not possible for the blood of bulls and goats to take away sins.
David obviously knew this, too. A dead animal wouldn’t be enough. He knew he needed his sin to be forgiven and removed.