Jesus gives two examples :
Jesus does not argue that it was not unlawful in the first case or not desecration in the second case.
His argument regards 'mercy not sacrifice' and 'the son of man is Lord of the sabbath'
Jesus' words show that the law of ordinances is, within itself, imperfect in that the very setting forth of spiritual things demands that there be an allowance for the priests (in order to enact, in ritual and artifact, a representation of the future everlasting testament) to trespass the proscriptions regarding sabbath observance.
The whole setting forth, therefore, is imperfect. It is but sign and figure and representation. It is not a perfect thing to be followed for its own sake. It is there that faith may lay hold on all that is therein represented and may believe in that to which the types and figures allude.
For the law having a shadow of good things to come, and not the very image of the things, can never with those sacrifices which they offered year by year continually make the comers thereunto perfect. [Hebrews 10:1, KJV]
And he comments, in conclusion, that the son of man, that is to say The Son - of man (the Son of God come of humanity) is Lord of the sabbath. For the sabbath, itself, is an arbitrary day given that there may be an understanding of the rest that is of faith when one by faith ceases from one's own works and trusts in the living God.
When one does as God did, having ceased all natural labour within the material, substantive creation and one enters into a perpetual rest in spiritual things.
For he that is entered into his rest, he also hath ceased from his own works, as God did from his. [Hebrews 4:10, KJV]
Technically, yes, the disciples had trespassed an arbitrary day to which signification is attached in the covenant which sets forth the everlasting testament. But they were engaged in serving the requirements of him who is Lord of the sabbath, he who, in his coming, fulfils all that was ever set forth in Israel.
This, the critics should have seen and should not have condemned the guiltless.