The Rules Don't Work the Way You Think.
Greek (SBLGNT) with ESV parallel
fresh.bible editorialἘγένετο δὲ ἐν σαββάτῳ διαπορεύεσθαι αὐτὸν διὰ σπορίμων, καὶ ἔτιλλον οἱ μαθηταὶ αὐτοῦ καὶ ἤσθιον τοὺς στάχυας ψώχοντες ταῖς χερσίν.
[1] On a Sabbath, while he was going through the grainfields, his disciples plucked and ate some heads of grain, rubbing them in their hands.
τινὲς δὲ τῶν Φαρισαίων εἶπαν· Τί ποιεῖτε ὃ οὐκ ἔξεστιν τοῖς σάββασιν;
[2] But some of the Pharisees said, "Why are you doing what is not lawful to do on the Sabbath?"
καὶ ἀποκριθεὶς πρὸς αὐτοὺς εἶπεν ὁ Ἰησοῦς· Οὐδὲ τοῦτο ἀνέγνωτε ὃ ἐποίησεν Δαυὶδ ὁπότε ἐπείνασεν αὐτὸς καὶ οἱ μετ’ αὐτοῦ ὄντες;
[3] And Jesus answered them, "Have you not read what David did when he was hungry, he and those who were with him:
ὡς εἰσῆλθεν εἰς τὸν οἶκον τοῦ θεοῦ καὶ τοὺς ἄρτους τῆς προθέσεως λαβὼν ἔφαγεν καὶ ἔδωκεν τοῖς μετ’ αὐτοῦ, οὓς οὐκ ἔξεστιν φαγεῖν εἰ μὴ μόνους τοὺς ἱερεῖς;
[4] how he entered the house of God and took and ate the bread of the Presence, which is not lawful for any but the priests to eat, and also gave it to those with him?"
καὶ ἔλεγεν αὐτοῖς· Κύριός ἐστιν τοῦ σαββάτου ὁ υἱὸς τοῦ ἀνθρώπου.
Sources
SBL Greek New Testament (SBLGNT) · English Standard Version (ESV)