Also Mark 2:23-24 and Luke 6:1-2.
One explanation here was that Jesus intentionally led the disciples through the grain field knowing full well that they, being hungry, would begin to pluck the grain, since there was no other food available. The implied message is that Jesus had the authority to set aside the Sabbath as He wished. According to Luke it was a "double Sabbath" (i.e. in addition to being the Sabbath, it was also some sort of feast day).
One commentary in antiquity explains:
But why could He have led them away from it, who foreknew all, unless it had been His will that the Sabbath should be broken? It was His will indeed, but not simply so; wherefore He never breaks it without a cause, but giving reasonable excuses: that He might at once bring the law to an end, and not startle them. But there are occasions on which He even repeals it directly, and not with circumstance: as when He anoints with the clay the eyes of the blind man;1 as when He saith, My Father worketh hitherto, and I work.2 And He doth so, by this to glorify His own Father, by the other to soothe the infirmity of the Jews. At which last He is laboring here, putting forward as a plea the necessity of nature; although in the case of acknowledged sins, that could not of course ever be an excuse. For neither may the murderer make his anger a plea, nor the adulterer allege his lust, no, nor any other excuse; but here, by mentioning their hunger, He freed them from all blame.3
1. John 9:6,14
2. John 5:17
3. John Chrysostom (c 349-407), Homily XXXIX on Matthew (tr. from Greek)