After quoting the baraita which suggests that a person can choose to follow either the position of Beit Shammai or of Beit Hillel (6b), the Gemara is disturbed by the fact that the selfsame baraita opens by stating that in arguments between Beit Shammai and Beit Hillel, the opinion of Beit Hillel prevails. Several possible answers are suggested by the Gemara:
The section of the baraita that offers a choice in the matter was taught prior to the Bat Kol.
The baraita is presenting the position of Rabbi Yehoshua, who does not believe that one should pay attention to a Bat Kol
The baraita did not mean that one could choose to follow either Beit Shammai or Beit Hillel; rather it was using their argument as an archetype. When two Sages argue – like Beit Shammai and Beit Hillel – one cannot choose the leniencies or stringencies of both; one must choose to follow one or the other.
The “Bat Kol” (Divine Voice) mentioned here refers to a Gemara later on in Eiruvin (13b) that describes how Beit Hillel and Beit Shammai argued for three years, at which time a Bat Kol came out and declared that while both opinions are true, the halakha follows Beit Hillel (Elu v’Elu divrei Elokim hayyim, v’halakha K’Beit Hillel.)
The Ritva and Rabbi Nissim Gaon explain this difficult statement by referring to a Midrash that appears in the Jerusalem Talmud. According to the Midrash, when the Torah was given to Moshe on Mount Sinai, he was also given 49 ways to declare something pure and 49 ways to declare it impure, indicating that within the Torah itself there are levels of meaning that allow for the possibility of contradictory conclusions, leaving it to the leaders of the generations to choose the appropriate ruling for their time. According to this explanation, each position has its place in the Torah as it was given, so “both opinions are true.”
The second suggestion made by the Gemara – that the baraita is presenting the opinion of Rabbi Yehoshua who does not believe that one should pay attention to a Bat Kol – is a reference to the story told in Massekhet Bava Metzia (59b), where all of the Sages disagreed with Rabbi Eliezer regarding the ritual purity of an oven that could be taken apart. Rabbi Eliezer brought a series of miraculous proofs to his position, culminating with a Bat Kol that declared the halakha to be like Rabbi Eliezer. Rabbi Yehoshua’s response was “Lo ba-Shamayim hee” (a reference to Devarim 30:12) – halakha is not decided by heaven, rather by human courts.