At that time Jesus went through the grain fields on the Sabbath; his disciples were hungry, and they began to pluck heads of grain and to eat. When the Pharisees saw it, they said to him, "Look, your disciples are doing what is not lawful to do on the Sabbath." He said to them, "Have you not read what David did when he and his companions were hungry? He entered the house of God and ate the bread of the Presence, which it was not lawful for him or his companions to eat, but only for the priests. Or have you not read in the law that on the Sabbath the priests in the temple break the Sabbath and yet are guiltless? I tell you, something greater than the temple is here. But if you had known what this means, 'I desire mercy and not sacrifice,' you would not have condemned the guiltless. For the Son of Man is lord of the Sabbath."
Jesus is always the perfect masterful teacher, always merciful. Instead of lashing out at the Pharisees he patiently shows them, in an unfolding fashion, the deeper truth behind their rigidity.
His rebuttal is four-fold and progresses in its depth of meaning from an example out of their own salvation history step by step up to the throne of God.
He first gently shows them that there have been examples out of their own history of times when it is necessary to relax rigid adherence out of human necessity. The citation is from 1 Samuel 21.2-7. Second, he shows them that even in their own day there are times when the Sabbath regulation cannot be followed as in the case of priests who must labor on the Sabbath due to their function. Note that in these examples by citing the case of David and his companions and then the priests Jesus is trying to slowly open the eyes of the Pharisees to who he and his disciples are. He offers no apology for that reality!
Third, Jesus leads them to a deeper understanding of the law: human compassion over condemnation. They were wrong in following them for the express purpose of finding fault, firstly. But even more deeply he wants to free them from their slavish interpretation of Sabbath law. "The Sabbath was made for man, not man for the Sabbath." (Mark 2.27)
Finally he reveals again who he is. The disciples can pluck these heads of grain on the Sabbath because they are accompanied by the Lord of the Sabbath, Jesus Christ, the Son of God who is over all things and the author of all things, including the Sabbath. This explicitly makes him the source of the commandments given to Moses. Such a slow, patient unfolding of the truth. In our own lives we often are brought to an understanding of the events in our life or a spiritual truth only slowly, as children are led. So too are we given an example of the patience to have with others, particularly at times when it would seem better or easier to lash out.