Matthew 12:1-5

Mat 12:1 (KJB)
At that time Jesus went on the sabbath day through the corn; and his disciples were an hungred, and began to pluck the ears of corn, and to eat.

It is not known exactly where this happened but it does not matter because what is in view here is that Jesus is about to give a practical teaching on the Sabbath. The grain in view might have been either barley or wheat, however it could also have been actual corn. Sometimes corn in the Bible is used as a general description for different grains. If they were near Capernaum, then the barley harvest would be ready in March and the wheat harvest would be ready in May, this episode took place about a year before the Lordís crucifixion. It was the Sabbath day and the disciples were hungry so as they went they had decided to take a snack right off the stalks.

Mat 12:2 (KJB)
But when the Pharisees saw it, they said unto him, Behold, thy disciples do that which is not lawful to do upon the sabbath day.

If a person was hungry, it was permissible to eat what is needed to satisfy their hunger. (Deu 23:24-25 KJV) When thou comest into thy neighbour's vineyard, then thou mayest eat grapes thy fill at thine own pleasure; but thou shalt not put any in thy vessel. {25} When thou comest into the standing corn of thy neighbour, then thou mayest pluck the ears with thine hand; but thou shalt not move a sickle unto thy neighbour's standing corn. So they were not stealing from the vineyard. The Pharisees had seen this and they had deemed what the disciples did as unnecessary harvesting and therefore guilty of breaking the Sabbath by working on it. Breaking the sabbath was an offense punishably by death according to the law and so the Pharisees had gone to Jesus to tell Him what His disciples were doing because they thought that Jesus was responsible for the actions of His disciples.

Mat 12:3 (KJB)
But he said unto them, Have ye not read what David did, when he was an hungred, and they that were with him;

Then Jesus answers them, not by a direct defense, but goes back to the time of David with a scriptural narrative they should have been familiar with. He refers to the Scriptures of 1 Samuel 21:2-7. If the Pharisees would not condemn David, then they could not condemn the disciples, also if the priest gave the showbread to David, then he would not be condemned because David did not take the bread but it was given to him. (1 Sam 21:6 KJV) So the priest gave him hallowed bread: for there was no bread there but the showbread, that was taken from before the LORD, to put hot bread in the day when it was taken away. David and his men were hungry, just as the disciples were.

Mat 12:4 (KJB)
How he entered into the house of God, and did eat the showbread, which was not lawful for him to eat, neither for them which were with him, but only for the priests?

David had gone into the Tabernacle because the temple of God had not been built yet and inquired if there was any loaves of bread to eat or anything else to eat. David was given the showbread which was lawful only for the priests to eat. It was baked and replaced on the sabbath day. The priest who attended to David allowed him to take the showbread as long as the men had kept themselves ceremonially clean and kept from women for at least three days which they did. The disciples, like David were permitted to break the ceremonial law because the higher law of life was being obeyed. If they did not eat, then they would faint along the way and die of malnutrition. There was no condemnation given to David either by God or by the priests. At the time of David, the law of God was not yet perverted with so many legalistic additions and it was seen as a spiritual law for their benefit. (Rom 7:14 KJV) For we know that the law is spiritual: but I am carnal, sold under sin. The sabbath was made for man and not man for the sabbath. (Mark 2:27 KJV) And he said unto them, The sabbath was made for man, and not man for the sabbath:

Mat 12:5 (KJB)
Or have ye not read in the law, how that on the sabbath days the priests in the temple profane the sabbath, and are blameless?

Now Jesus puts it back on them showing them from the law itself that circumcision was permitted on the sabbath and the priests who did the circumcision were not considered working and thus breaking the sabbath. (John 7:23 KJV) If a man on the sabbath day receive circumcision, that the law of Moses should not be broken; are ye angry at me, because I have made a man every whit whole on the sabbath day? The priests themselves had duties to perform on the sabbath but they were not breaking the law of working on the sabbath. Baking the showbread and replacing the week old showbread was also done on the sabbath and those who did it were not breaking the law of God.