A number of solutions to this problem have been offered by biblical scholars, one of the most interesting of which involves the meaning of the Greek phrase epi Abiathar archieros used in Mark 2:26. Your source renders this as "when Abiathar was high priest." The Greek translated "when" here is epi. Usually it conveys a sense of location, as when translated "upon." Since 18 of the 21 times Mark uses the genitive form of epi he does so with reference to location rather than time, "when" probably isn't the best rendering in Mark 2:26.
Bible scholars have observed a possible parallel in Mark 12:26 where epi refers to the place in Scripture "concerning or entitled the Bush." If we translate Mark 2:26 along similar lines, then Jesus is referring his listeners to David's actions recorded in the section of Scripture "concerning" (epi) Abiathar the high priest.
Because David's eating of the showbread is mentioned in the chapter preceding the section on Abiathar, and since Abiathar is the more important of the two priests in 1 Samuel, it would make sense to refer to this whole section of Scripture as "concerning" Abiathar. Such an interpretation retains the sense of epi as related to location.