Hosea 6:6 - “For I desire steadfast love and not sacrifice, the knowledge of God rather than burnt offering”
God desires inward obedience, not just outward obedience. In this verse, love for God is equated with knowledgee of God. To know him is to love him.
Matthew 9:13 - “I desire mercy, and not sacrifice”
Why does Jesus change the verse from steadfast love to mercy? I think he is showing the pharisees that they have no love for others and therefore have no love for God. Anyone who loves God will also show mercy to others.
Jesus is essentially saying “if you really loved God and knew him, you would show mercy to these sinners, not condemnation and self-righteous judgement.”