Only Matthew has this verse. In the Lord’s mind this quotation from Hosea 6:6 sums up in few words what is wrong with the Pharisees’ whole approach to religion.
How terrible it is that religion can become the servant of sin. So invasive is sin that there is nothing that it cannot commandeer for its purposes; it is happy to use the worst of things and the best of things. It has skill beyond normal human ability to see a way of hijacking everything for its own ends. So the worship of God can become an act of boasting, an act of deceit, and of hypocrisy. How does God feel when men and women come before him in pretence? They make out that they come with love for him in their hearts, but he sees that they do not love him but themselves. Can that worship please him? Is he content with a form of godliness? The door is opened up for false worship as soon as we choose sacrifice and not mercy. Sacrifice can be seen by others, and earns religious credit for the hypocrite, but mercy truly takes the eyes off self.
Sometimes the seeking soul says, ‘How do I know that Christ would listen to me or accept me?’ Look at his life. Look at his heart of compassion. Don't you see it? Of course, he will receive you and accept you and forgive you. He is qualified; he has the compassion and he has the remedy too; he has died on Calvary. But he has not come for the righteous, people who imagine they are righteous, or that they don't need hm. Is that you? ‘Oh I know I've got my faults, but I'm not too bad a person. I do good things. I'm better than some others. I'm basically a nice person.’ Do you think so? Well, I'm glad you do some nice things, but when God looks at us, he sees beneath all that, and he sees the cauldron of sin in the heart, and he sees all the stains and the guilt. No, we better start feeling our need of the forgiving love of God, or we are doomed eternally. ‘I came not to call the righteous, but sinners to repentance.’