This is the point of the historical lesson. Melchizedek did what he needed to do to repent and receive the priesthood, and then taught his people. There appears to be some hint here that Melchizedek might have shared in his people's wickedness. If so, then this becomes an even stronger connection to Alma the Younger. It is very possible that both the story of a repentant, then triumphant Melchizedek was well known to the Ammonihahites through their copies of the scriptures. It is also equally possible that Alma the Younger's miraculous conversion was also known to them. Alma's selection of Melchizedek as a model of himself appears to have been apt on many levels.
The point, of course, is that the people ultimately believed. It is that belief, and repentance, that Alma is urging upon the Ammonihahites.
Textual: There is an interesting difference in this verse between the tradition Alma is using and the oral tradition available to Paul. In Paul we find that Melchizedek is: "Without father, without mother, without descent, having neither beginning of days, nor end of life…" (Hebrews 7:3). Some of this language is echoed in Alma, but is referring to the priesthood, not to the person:
"This high priesthood being after the order of his Son, which order was from the foundation of the world; or in other words, being without beginning of days or end of years…" (Alma 13:7).
In addition, in verse 18 Alma clearly indicates that Melchizedek reigned "under his father." While we may not be certain of the regnal relationship, Alma clearly gives Melchizedek a father, while Paul indicates that he does not have one. Thus there are differences in the sources of the two traditions, with Alma's apparently holding to a less supernatural explanation of Melchizedek, and Paul's source giving the appearance of a longer oral tradition that has tacked on the trappings of the other-worldly.