David was a priestly king. David was a king who often performed priestly functions. He wore a linen ephod. Only the priests wore that. He ate sacred bread that was for the priest. He built an altar and offered sacrifices. Only priests were supposed to do that. But let’s go first a little further. In Psalm 110, which was either written by a court poet about David or written by David about the Messiah. It says of David as the prototype of the Messiah or it says of the Messiah directly.
You will be a priest forever after the order of Melchizedek. So david like Melchizedek would be a priestly king and here’s what you have to understand. Messiah first came to do his priestly work, to deal with sin, to make atonement for the sins of the nation, to intercede on our behalf. He will return at the end of the age to finish his mission again. He’s the only possible candidate. Only the one who started the mission can fulfill the mission.