No doubt many groups have slugged their way through Hebrews trying to make sense of all the illusions to the old testament. At the end of the day, the author (unknown to us) is trying to make a comprehensive (and apparently orderly) argument for the authority of Jesus as messiah. His audience is comprised primarily of Jews who accepted christ as messiah but are back tracking into their jewish roots. Now we meet this guy with a funny name, Melchizedek which is roughly translated king of righteousness. There is a lot of debate about who this guy really is, where did he come from and how does he fit in the overall biblical narrative. We don’t have a ton to go on. We are introduced to Melchizedek in Genesis 14:18 “Then Melchizedek king of Salem brought out bread and wine. He was priest of God Most High, 19 and he blessed Abram, saying,’Blessed be Abram by God Most High, Creator of heaven and earth.20 And praise be to God Most High, who delivered your enemies into your hand.’ Then Abram gave him a tenth of everything.” Then David mentions this priest of God Most High in the messianic psalm 110, “‘You are a priest forever, in the order of Melchizedek.'” So the Author of Hebrews takes what little is known about Melchizedek (his family line, origin, how he became priest, death) and positions him as a Messiah “prototype”. Here we have a high priest who was also a king without a beginning or end who is not a Levite (which is the family clan where priest only came from). Jesus also not coming from the line of Aaron (levite) who has no beginning (co-eternal with the father) is being linked to this messiah “prototype” for the purpose of establishing his authority as eternal king and high priest replacing the old system of sacrifices with his once and for all sacrifice. At the end of the day the author of Hebrews is using Melchizedek to build an exhaustive case for the superiority of Christ and the messiah that was sent to rescue his people once and for all.
There is plenty of debate around Melchizedek, but this at least drives at the heart of the authors intent for using him in his case for Jesus.