Rav Moshe Feinstein(Igros Moshe O.H. 1 Introduction): It is correct and obligatory for the sages of the latter generations to decide halacha - even if they are not qualified according to the standards of the sages of the gemora. Therefore there is definitely a concern that their halachic determinations are not in accord with the view of Heaven. However in truth we are guided by the principle that Torah is not in Heaven. Rather it is determined according to what appears correct to the rabbi after proper study of the issue to clarify the halacha according to the Talmud, and the writings of poskim. He is to use his full abilities to seriously deliberate with fear of Heaven - in order to determine what appears to be the correct halacha. Such a psak is viewed as true and he is obligated to issue his conclusion. This obligation exists even if in fact his ruling is contrary to the halacha in Heaven. His ruling is also considered the “word of the living G‑d as long as he is convinced he is correct and it is internally consistent. He will receive reward for his rulings even if the truth is not in accord with his position. Proof for this is found in Shabbos (130a): A certain city in Israel that followed the halacha according to R’ Eliezer - even though this was not the accepted halacha - got great reward in terms of long life… Thus ruling which a rabbi is obligated to teach and receive reward for is that which he decides after studying the issue with his full ability. This obligation and receiving of reward exists even if the ruling is not in accord with the truth. This is the nature of all disputes of the rishonim and achronim concerning what is permitted and what if prohibited. As long as a universal ruling has not been determined - each rabbi can make decisions for his followers according to that which he thinks is correct - even though the objective halacha is only in accord with one of them. Both will also receive reward for their rulings. Because of this we find much dispute also in the most severe prohibitions - with variations between places that rule like the Rambam and Beis Yosef and those that rule like Tosfos and the Rema. Both of the opposing views are “the words of the living G‑d even though the actual truth as understood by Heaven is only like one of them.
Rav Moshe Feinstein(Igros Moshe Y.D. 3:92): Our Sages describe the opposing views of halachic debate as both being “the words of the living G‑d.” This means that Torah study of the diverse views of Sages inherently does not contain something which is not true. Thus the opposing views of Beis Shammai and Beis Hillel are both true. This rule applies also to the disputes of R’ Eliezer and all the Tannaim and Amoraim. All of them were given from One Shepherd. Thus it was not untrue when the Heavenly Bas Kol announced that the Halacha was in accord with R’ Eliezer. His words were inherently true - even though in this world we decide practical Halacha on the basis of majority decision. Because of the inherent truth of all views of our sages, we say the blessing “Who gave to us the Torah of truth” even if we are only learning the views that have been rejected from practical Halacha such as Beis Shammai or minority opinions.
R’ Yisroel Salanter(Ohr Yisroel #30): Perhaps the reason that the Bas Kol announced that both Beis Shammai and Beis Hillel were the “words of the living G‑d” was not that a rejected opinion is not Torah (because Torah is not in Heaven and they both obviously had a tradition from Moshe at Sinai and hadn’t forgotten it). But rather so the people should not despair after seeing them dispute for three years. They might have thought that perhaps the disputing sides had slipped slightly from total objectivity and that this slight bias removed the rejected view of Beis Shammai from being considered G‑d’s Torah. Therefore, the Bas Kol informed them that the view of Beis Shammai were totally acceptable to G‑d. The debate was prolonged because each side felt strongly that their view was superior to the other. Nevertheless, even the rejected views of Beis Shammai are the “words of the living G‑d” and one who studies them is studying G‑d’s Torah.