In the closing daf (=page) of Masechet Menahot, the Gemara discusses the state of Diaspora Jewry and quotes a passage from Sefer Malakhi (1:11) where the prophet discusses how God’s Name is known throughout the world, where “pure offerings” are presented to Him in all places.
Tosafot point out that this teaching is, in fact, the subject of some discussion in Masechet Kiddushin 29b. There we find an apparent disagreement on this matter. Rav Yehudah quotes Shmuel as ruling that a person should first get married, and can study Torah later; Rabbi Yohanan objects, arguing rehayim be-tzavaro ve-ya’asok ba-Torah!? “with a millstone – i.e. the responsibilities of supporting a family – on his neck, how can he study Torah!” He concludes that a person should study Torah first and get married afterwards.
The Gemara concludes that there is really no disagreement between Rav Yehudah and Rabbi Yohanan – ha lan ve-ha lehu – we must recognize the differences between the communities in Bavel and Israel. What the Gemara does not explain is which ruling is appropriate for which community and why that would be the case.
Rashi explains Shmuel’s ruling as applying to students from Bavel who traveled to Israel to study. Since they were not at home, they were not responsible for supporting their families, and could marry first. Rabbi Yohanan was talking to Israeli students who remained at home and could not divest themselves of their responsibilities. They were, therefore, encouraged to study first and marry later.
Tosafot do not accept Rashi’s explanation. They are disturbed by the idea that a man can choose to abandon his family in order to travel to a foreign land and study. Furthermore, the ruling that encouraged marriage before study was made at least partially to allow a man to learn Torah while having satisfied his natural sexual urges; if he leaves his wife behind in Bavel, this is not accomplished. Rabbenu Tam suggests that Rabbi Yohanan was telling the poor students of Bavel that they should come to Israel for study before they take on the responsibilities of a family, while Shmuel was telling the wealthy Israeli students that they could marry, since they would remain at home during their studies.
Some rishonim follow Rashi’s approach, but with a different explanation. In Bavel tradition allowed young women to work and support the family, so students who made such an arrangement could first marry. In Israel, where the entire responsibility of support was on the husband, students were told to first learn Torah and to marry later.