You do not delight in sacrifice, or I would bring it;
you do not take pleasure in burnt offerings.
The sacrifices of God are a broken spirit;
a broken and contrite heart,
O God, you will not despise.
In your good pleasure make Zion prosper;
build up the walls of Jerusalem.
Then there will be righteous sacrifices,
whole burnt offerings to delight you;
then bulls will be offered on your altar.
- Ps. 51
More reflections on David's psalm. Here he hits on a problem with the difference between religion and spirituality that we still deal with today.
Starting out, he realizes that God isn't concerned with the things that we do so much as the state of the heart. But one short verse later, he returns to extolling the virtues of doing the very things that he just claimed God didn't place much value in.
So...which is it?
Well, as David realized, both. But in a new way. For all of history, men have been doing things for God in order to get something from him. Cain and Able, the pharisees in Jesus' day, and the religiously overt people we see in our day and age, doing the same "good things" to please God. The problem is with the motive - most times we are doing our good works to not in fact please God so much as to get something we want from Him. Like David realized, God isn't looking for that.
But God can still delight in these very works, when they are done for a different motive. When committed with 'a broken and contrite heart,' these "good things" take on a new motive - one that wants to please God because of who God is and what He has already done and promised to us.
One method seeks to get something, while the other seeks to give out of joy - a joy that comes from knowing and resting in what we already have been given. Giving in this way is the truest form of love, and even the smallest offering given in this spirit is sure to delight.
It is so far from being true that [salvation by grace alone] makes us remiss in a pious and holy life, that on the contrary without it we would never do anything out of love to God, but only out of self-love or fear of damnation. Therefore, it is impossible that this holy faith can be unfruitful; for we...speak of a faith which is called in Scripture a 'faith working through love,' which excites us to the practice of those works which God has commanded in His Word.... [Otherwise] we would always be in doubt, tossed to and fro without any certainty, and our poor consciences would be continually vexed if they relied not on the merits of our Savior. - The Belgic Confession (1561) Chapter 24