We learn in the Mishna
(Pirke Avot - Ethics of the Fathers 5:21) "Any dispute which is for the sake of heaven will have enduring value but any dispute that is not for the sake of heaven will not have an enduring value."How can a disagreement on interpretation of Torah be construed as a positive manifestation of God's word? What is an example of a dispute which is for the sake of heaven? The Mishna goes on to answer that it is the dispute between Hillel and Shamai. And what is an example of a dispute that is not for the sake of heaven? The dispute between Korach all his followers."
What does 'for the sake of heaven mean'? Rav Shimshon Raphael Hirsch explains that if those on both sides of the dispute have pure motives and their purpose is to understand the truth then their dispute is 'for the sake of heaven' and will endure. Even through there is only one truth and the halacha is decided according to only one of the conflicting opinions, the dissenting opinion is also Torah and we must learn it. Therefore even though the opinions of the School of Shamai were by and large rejected, we learn their opinions in order to better understand the inner truth of the Law. On the other hand the motives of Korach and his followers were not pure, rather they challenged Moses' authority saying to him "Isn't it enough that you brought us into the wilderness to die, you would also reign over us!?!" (see Numbers - Bamidbar 16:13) We see that Korach and his followers were not interested in the truth and service of God but in power and the honor that comes with leadership.
There is a great controversy in Orthodox Judaism on the subject of women learning Gemarra. It can not be denied that most of the great authorities and decisors of Torah law in our generation are against the idea of women learning Gemarra. However, there are many Orthodox rabbis who see women's learning in a positive light. The question is: Is this dispute 'for the sake of Heaven'? If women come to learn in order to challenge the authority of men and say 'why should men have authority over us if we are as good as you?' it is not for the sake of heaven. But if they come to learn in order to better understand the commandments of the Torah, especially those that women are obligated to perform like the blessings, laws of ritual purity, Passover, the Sabbath etc., then it is certainly for the sake of heaven. As I once heard my rabbi and teacher Rav Shlomo Aviner SheLY'Ta say (to the best of my recollection)in the name of Rav Tzvi Yehuda Hacohen Kook ZaTz'al- Women are certainly obligated by the commandment 'You shall love the Lord your God with all your heart" and the learning of all the disciplines of Torah, when the purpose is to better serve the Lord it is not only permitted but is to encouraged".