Among other places, the following Braisa appears in Eruvin 6b:
לעולם הלכה כבית הלל והרוצה לעשות כדברי בית שמאי עושה כדברי בית הלל עושה מקולי ב"ש ומקולי ב"ה רשע מחומרי ב"ש ומחומרי ב"ה עליו הכתוב אומר (קהלת ב, יד) הכסיל בחשך הולך אלא אי כב"ש כקוליהון וכחומריהון אי כב"ה כקוליהון וכחומריהון
Really, the Halacha follows Beis Hillel. However, one who wishes to hold like Beis Shammai may do so; like Beis Hillel, he may do so; like the leniencies of Beis Shammai and the leniencies of Beis Hillel, he is wicked; like the stringencies of Beis Shammai and Beis Hillel, regarding him the passuk says, “The fool goes in darkness.” Rather, if like Beis Shammai, in their leniencies and their stringencies; if like Beis Hillel, in their leniencies and their stringencies.
In explaining this Braisa, the Gemara (Ibid. 7a) says:
אמר רב שיזבי כי לא עבדינן כחומרי דבי תרי היכא דסתרי אהדדי כגון שדרה וגולגולת דתנן השדרה והגולגולת שחסרו וכמה חסרון בשדרה בש"א שתי חוליות וב"ה אומרים חוליא אחת ובגולגולת בש"א כמלא מקדח וב"ה אומרים כדי שינטל מן החי וימות ואמר רב יהודה אמר שמואל וכן לענין טריפה
Says Rav Sheizbi: When do we not so like two opposing stringencies? When they contradict each other, like the case of the spine and skull, as we taught in a Mishnah:
The spine and the skull that are missing [fragments don’t impart tumah by being in the same room - Rashi]. How much must be missing from the spine [to be subject to this leniency]? Beis Shammai say: two vertebrae. Beis Hillel say: one vertebra. And in the skull? Beis Shammai say: a drill hole. Beis Hillel say: enough that were it taken from a live person, they would die.
And Rav Yehudah said in the name of Shmuel, they likewise argue by treifah. [An animal is only a treifah if it meets these same requirements - Rashi.]
Rashi elaborates:
ומאן דעביד בטריפה כבית הלל וכבית שמאי במת הוי כסיל דהא סתרין עובדי אהדדי דהכא הוי חסרון והכא לא הוי חסרון
One who does by a Treifah like Beis Hillel and like Beis Shammai by a dead person is a fool, for these opinions contradict each other: here this measurement is considered “missing” and here this measurement is considered “missing.”
That is to say: where the reasons of the opinions contradict, we may not hold of two opposing stringencies or leniencies.
Now look at Challah 4:7 (brackets are adapted from Bartenura):
יִשְׂרָאֵל שֶׁהָיוּ אֲרִיסִין לְנָכְרִים בְּסוּרְיָא, רַבִּי אֱלִיעֶזֶר מְחַיֵּב פֵּרוֹתֵיהֶם בַּמַּעַשְׂרוֹת וּבַשְּׁבִיעִית, וְרַבָּן גַּמְלִיאֵל פּוֹטֵר. רַבָּן גַּמְלִיאֵל אוֹמֵר, שְׁתֵּי חַלּוֹת בְּסוּרְיָא. וְרַבִּי אֱלִיעֶזֶר אוֹמֵר, חַלָּה אֶחָת. אָחֲזוּ קֻלּוֹ שֶׁל רַבָּן גַּמְלִיאֵל וְקֻלּוֹ שֶׁל רַבִּי אֱלִיעֶזֶר. חָזְרוּ לִנְהוֹג כְּדִבְרֵי רַבָּן גַּמְלִיאֵל בִּשְׁתֵּי דְרָכִים:
A Jew who sharecrops a non-Jew’s field in Syria: R’ Eliezer obligates its produce in Ma’aser and Shemitah [like Eretz Yisrael], and R’ Gamliel exempts [like outside Eretz Yisrael]. R’ Gamliel requires two Challos in Syria [one to be given to a Kohen and one to be burned, like outside Eretz Yisrael], and R’ Eliezer requires one Challah [like Eretz Yisrael]. They grabbed hold of the leniencies of R’ Gamliel and R’ Eliezer, but then retracted to hold like the words of R’ Gamliel in both cases.
At first, they held of opposing leniencies - contradicting themselves as to whether it was considered Eretz Yisrael or not - and then retracted to hold that it is like Chutz LaAretz in all aspects.
The Bartenura explains that one who holds of opposing leniencies is a wicked person - Tosfos Yom Tov notes that he gets it from the above discussion in Eruvin - and so they retracted to hold like a single authority.
So what were they thinking at first? Did this teaching, that one is wicked for holding of opposing leniencies, suddenly materialize in the middle of this discussion? Why wouldn’t they hold of this teaching originally? Why did they need to retract and they didn’t just hold like one opinion the entire time?