If you had known what these words mean, 'I desire mercy, not sacrifice', you would not have condemned the innocent.
Analysis
Jesus here cites Hosea 6:6, where the prophet proclaims that God desires mercy, and not sacrifice, or that God prefers mercy to sacrifice.[1] The Pharisees have not properly understood the words of God. John MacEvilly refers to the disciples' "mere material violation of the letter of the law" as excused by their "exercise of mercy to the souls of their brethren, whom they wished to rescue from eternal perdition", and also to the Pharisees' "excessive zeal for the law", which renders them "devoid of all feelings of humanity and benevolence".[1] Thus it is lawful to violate the Sabbath rest. In his comments on this verse, Cornelius Cornelii a Lapide refers to a saying attributed to Simeon the Just, in Pirke Aboth, i.e., The sentences of the Fathers, "The world rests upon, and is supported by three things, 1. by the law, 2. by Divine worship, and 3. by mercy."[2]
Commentary from the Church Fathers
Chrysostom: "And because what He had said seemed hard to those that heard it, He again exhorts to mercy, introducing His discourse with emphasis, saying, But had ye known what that meaneth, I will have mercy and not sacrifice, ye would never have condemned the innocent."[3]
Jerome: "What I will have mercy, and not sacrifice signifies, we have explained above. The words Ye would never have condemned the innocent are to be referred to the Apostles, and the meaning is, If ye allow the mercy of Achimelech, in that he refreshed David when in danger of famishing, why do ye condemn My disciples?"[3]