The original ordination, passed down from Moshe to Yehoshua and continuing from teacher to student, was lost in the year 358 CE, according to R. Aryeh Kaplan (Handbook of Jewish Thought, 10:39 p. 209). However, even before that time, there was an alternate form of ordination. By law, ordination may only take place in the land of Israel. In Talmudic Babylonia, a pseudo-ordination was performed which was distinguished between the traditional ordination in title — someone traditionally ordained in Israel was titled Rabbi while someone ordained in Babylonia was called Rav. In fact, one of the (weaker) arguments of the Maharalbach against the sixteenth century attempt to revive traditional ordination in Israel was that scholars who were inaccurately called Rabbi would have to lose that title if a legitimately titled Rabbi existed, which was an affront to them.
In Geonic times, the Gaon (rosh yeshiva) would write an Iggeres Reshus, certifying a scholar as being qualified to serve as a judge. The idea of certifying scholars in writing seems to have spread. In late eleventh century, 50-100 years before the Rambam, R. Yehudah of Barcelona published a standard text of ordination in his Sefer Ha-Shtaros. In that ordination text, it states that “from that day forward, all men will call him rabbi and they appoint him among the judges.” Ordination certificates often used the phrase “yoreh yoreh yadin yadin” (J.D. Eisenstein, Otzar Yisrael, vol. 7 p. 222). Similarly, in fourteenth century Spain and North Africa, the Rivash wrote that rabbinic ordination was a request of permission “to rule and to judge” (Responsa, no. 271).
Following the Black Plague in the fourteenth century, there was a severe shortage of qualified Torah scholars. In such a situation, many underqualified scholars attempted to fill the holes, leading to a situation that had the potential for improperly conducted marriages and divorces. In response to this problem, R. Meir HaLevi of Vienna established a system of two-level ordination. A scholar can be certified as a “chaver” to function as a rabbi but only one with a higher certification, that of “moreinu“, could perform marriages and divorces (Simcha Assaf, Be-Oholei Ya’akov, p. 28). We have an ordination certificate written by the Terumas Ha-Deshen in the early fifteenth century, in which he notes that his ordainee had already attained the title “chaver” and was now attaining the title “moreinu” (Assaf, p. 62). Interestingly, there exists a mid-eighteenth century letter from R. Yonasan Eybeshutz declining to certify a young Moses Mendelssohn as a “chaver” because he deserved better but also declining to certify him as “moreinu” because he was not yet married (Otzar Yisrael, vol. 6 p. 138).
Note that there are ordination certificates which certify their holders to being “a scholar when he desires” (cf. Gittin 67a), meaning that they are sufficiently learned to be able to study material and master it. That is why, I believe, most rabbinic programs do not test students on everything a rabbi needs to know. If they can master the material on the syllabus, they can certainly master the other required knowledge needed to serve as a rabbi.
Not everyone ordained served as a rabbi. Ordination allowed a man to participate fully in communal activities and to vote among the wealthy and other communal notables on the appointment of a rabbi (Assaf, p. 32). In one town in Poland, 40% of the men were ordained. There are a number of sarcastic statements in the literature about the large number of ordained men (Assaf, p. 31). In fact, it seems that one source of a town rabbi’s income was from ordaining men (Assaf, p. 47).
Why was the qualification to judge always implied or stated in rabbinic ordination? Because rabbis in small towns had to serve as judges, among their other responsibilities. In larger towns, special judges were hired and the rabbis oversaw their work, only sometimes dealing with the more difficult cases (Assaf, p. 50). That is why rabbinic ordination historically implied a qualification to serve as a judge.
III. In Modern Times
Interestingly, Otzar Yisrael (vol. 7 pp. 222-223), published in 1912, compares ordination certificates of different nineteenth century denominations. The Orthodox ordination is from R. Yitzchak Elchanan Spektor and says “yoreh yoreh yadin yadin.” The Conservative (slightly anachronistic term) ordination is from R. Zechariah Frankel and also says “yoreh yoreh yadin yadin.” Ordination from HUC is briefly discussed as being in English and largely irrelevant, and then author complains that JTS ordination also says “yoreh yoreh yadin yadin” even though the ordainees “do not know between their right and their left in ruling or laws of the forbidden and permitted, as is necessary for an ordained rabbi, and this is an insult to the Torah.”
Also interesting is the Encyclopedia Judaica article on the subject (link), which states:
In its main outline, though with various changes in details, this conception of the rabbi and his office remains to the present day that which in fact dominates the society and communities of Mitnaggedim wherever they are found, the religious establishment in the State of Israel, and communities of Hungarian and German Orthodoxy and Neo-Orthodoxy. In these circles the office and conception of the rabbi are those which have emerged from the Middle Ages: he is seen as scholar and teacher, judge and spiritual leader.
In summary, rabbinic ordination to serve as a town’s rabbi has historically included serving as a judge. In fact, the very term “moreh hora’ah” was first used in reference to a judge (Kesubos 79a). Changing that is a break with the past. I remember hearing R. Robert Hirt explain why rabbinic students learn the laws of slaughtering in great depth even though the days when a community rabbi would have to rule on such matters is long gone: there is a corpus of knowledge that rabbis traditionally have to know and we are bearers of that tradition. It can similarly be suggested that there is a tradition to what a rabbi must be qualified to perform.
See also: Dr. Aaron M. Schreiber, Jewish Law and Decision-Making: A Study Through Time, pp. 320-327; Prof. Saul Lieberman, “Responsum on the Ordination of Women” in Tomeikh KaHalakhah vol. 1.