25 He answered, “Have you never read what David did when he and his companions were hungry and in need? 26 In the days of Abiathar the high priest, he entered the house of God and ate the consecrated bread, which is lawful only for priests to eat. And he also gave some to his companions.” (NIV)
Abiathar or Abimilech?
There is an apparent and well-known contradiction between 1 Samuel 21:1-6 and Mark 2:25-26 with respect to who was the priest at the time.
Harry Whittaker’s Studies in the Gospels Chapter 39
Abiathar the high priest.
Those alert for signs of human fallibility in the gospels, and indeed in Jesus himself, make much of the Lord’s allusion to the “days of Abiathar the high priest” (Mk. 2:26), as though he (or Mark) had forgotten that Ahimelech was high priest at the time. Two simple observations constitute adequate reply. First, that the expression means “about the time of Abiathar”. A similar rather elastic usage of the same Greek form comes in Matthew 1:11 “And Josias begat Jeconias and his brethren about the time of the carrying away to Babylon”. Second, since it is an evident New Testament mode of speech to speak of “David the king” (Mt. 1:6) by anticipation and of “Rahab the harlot” (Heb. 11:31) and “Matthew the publican” (Mt. 10:3) retrospectively at a time when none of these descriptions was strictly correct, so also Abiathar could be called “high priest” proleptically. But the real reason for the mention of Abiathar rather than Ahimelech lies in the symbolism. Abiathar (“the remnant of my Father”) was the one who let go his loyalty to the sanctuary in order to become a wanderer and an outlaw with David. It was the Lord’s way of telling the Pharisees that they were better to exchange their zeal for the temple for the less reputable discipleship of the peripatetic Son of David. However, the appeal was in vain. This was only the beginning of a sustained attack on Jesus, sabbath observance being the stick they used to beat him with.
Compare another answer from the Gotquestions site:
Why does Jesus call Abiathar the high priest in Mark 2:26, when 1 Samuel 21 indicates it was Ahimelech?
In Mark 2:26, Jesus refers to “Abiathar the high priest” who was on hand when David and his men ate the showbread from the tabernacle in Nob. This statement has raised some interpretive questions because, in 1 Samuel 21, Ahimelech seems to have been the high priest who helped David, not Abiathar.
In Mark 2, Jesus has a discussion with the Pharisees, who were critical of Jesus and His disciples for “harvesting grain” on the Sabbath—in point of fact, the disciples were simply plucking some heads of grain to munch on as they walked through a grainfield (verse 23). In defending the lawfulness of His disciples’ action, Jesus cited the Old Testament story of David and Abiathar (or was it Ahimelech?) at the tabernacle (Mark 2:25–26; cf. 1 Samuel 21:1–6).
In 1 Samuel 21, David approaches “Ahimelech the priest” in Nob and asks for provisions for his men (verses 1–5). David and his men were on the run from Saul, but David keeps that fact from Ahimelech. Ahimelech gives David some of the “bread of the Presence” (verse 6) and then, at David’s request, gives him Goliath’s sword, which was being kept there in Nob (verses 8–9). Later, when King Saul summons the priests to Gibeah for interrogation, Ahimelech is the priests’ spokesman (1 Samuel 22:6–14). The passage implies that Ahimelech is the chief priest during the time David fled from Saul. To explain why Jesus spoke of Abiathar as the high priest during that time, several theories have been put forward:
1) Since Abiathar was the son of Ahimelech (2 Samuel 8:17), it is possible that both men took part in high priestly duties. We see a similar arrangement in the time of Eli, when Eli’s sons seemed to have shared his duties (1 Samuel 4:4); and in the time of Christ, when Annas and his son-in-law Caiaphas both served in the role of high priest (Luke 3:2; John 18:13).
2) Abiathar was more closely associated with David than Ahimelech was. Abiathar was present when David came to the tabernacle, and he was the sole survivor of Doeg the Edomite’s slaughter of the priests of Nob (1 Samuel 22:18–20). Abiathar immediately showed his loyalty to David: he brought the ephod to David and later oversaw the transport of the ark of the covenant to David and was a long-time high priest during David’s reign (1 Samuel 23:6–9; 2 Samuel 15:29).
3) Abiathar, being present in Nob when David visited the tabernacle, is called the “high priest” in anticipation of his future title. We often do this very type of thing; for example, we may speak familiarly of “President Eisenhower” giving the order to invade Normandy on D-Day, although D-Day was almost nine years before Eisenhower was inaugurated President.
Mark 2:26 is a difficult passage, but Jesus was not in error, and He did not contradict 1 Samuel 21. There are workable explanations for why Jesus called the high priest Abiathar, and His words in Mark 2 can be reconciled with the Old Testament account.