And he said to them, “Have you never read what David did, when he was in need and was hungry, he and those who were with him: how he entered the house of God, in the time of Abiathar the high priest, and ate the bread of the Presence, which it is not lawful for any but the priests to eat, and also gave it to those who were with him?” And he said to them, “The Sabbath was made for man, not man for the Sabbath. So the Son of Man is lord even of the Sabbath.”
Mark 2: 25-28 ESV
The Sabbath is given by God for a reminder for human to enter the rest with God. King David overruled the rule in the old testament as Jesus points out by entering the temple and eating the bread of presence during his emergency plight. Jesus claimed that He is the Lord of the Sabbath, because Sabbath was made for mankind for them to actually enjoy the union with God, it’s not a day meant to be filled with strict tradition or a day where mankind judge each other.