O Lord, open my lips, and my mouth will declare Your praise. For You would not delight in sacrifice, or I would give it, nor be pleased by burnt offerings. The sacrifices of God are a broken spirit. A broken and a contrite heart, O God, You will not despise. (Ps 51:17-19. TLV)
Miserable, showing-off and pouting are not traits that belong to children alone; adults sometimes act like spoilt children.
David knew that going through the actions, like we are doing God a favor, is no sacrifice at all. It wouldn’t do us any good, and God would not accept it.
In the previous verse 14 David cries out for deliverance, he says, “Deliver me from the guilt of bloodshed, O God, The God of my salvation, And my tongue shall sing aloud of Your righteousness.” Literally, take the weight from me that I might look up and sing your praises. David knew that God was looking for brokenness and repentance, not pride and arrogance. Brokenness is a vessel that is pliable, one that God can mold and reshape. The prideful are set in their ways, unable to change or be changed.