(Exodus 2:21:) "Then Moses consented (wa-yo'el) to dwell with the man." Rabbi Judah says: What is the meaning of "consented" (wa-yo'el)? That he swore an oath to him, as it is said (I Samuel 14:24): "And Saul made the people swear (wa-yo'el)." He accepted upon himself to dwell with him; and "consented" (wa-yo'el) means nothing other than an expression of dwelling, as it is said (Judges 19:6): "And now, please consent (ho'el) and spend the night." (Exodus 2:21, continued:) "And he gave Zipporah his daughter to Moses." Once he took his daughter, he appointed him to shepherd his flock, as it is said (Exodus 3:1): "Now Moses was tending the flock." What is the meaning of "was tending"? Rabbi Yohanan said: Everyone of whom "was" is stated, he was so at his beginning and he was so at his end; he was worthy at his beginning and worthy at his end. The Rabbis say: Everyone of whom "was" is stated nourished and sustained. They said to him: But behold (Genesis 3:1): "Now the serpent was more cunning." He said to them: He too was prepared for punishment. They said to him: But it is written (Genesis 4:2): "And Cain was a tiller of the ground." He said to them: He too was prepared for exile. They said to him: But it is written (Jeremiah 38:28): "And it was when Jerusalem was captured." He said to them: It was a good sign for her, for had Jerusalem not been captured, the enemies of Israel would have been consumed. Rabbi Levi said: Everyone of whom "was" is stated saw a new world; therefore (Exodus 3:1): "Now Moses was tending the flock."
Why Scripture Says Moses Was Tending the Flock
Midrash Tanchuma Buber, Shemot 11:4
ויואל משה לשבת את האיש (שמות ב כא), ר' יהודה אומר מהו ויואל, שנשבע לו, שנאמר ויואל שאול את העם (ש"א יד כד), קיבל עליו לדור עמו, ואין ויואל אלא לשון דירה, שנאט' ועתה הואל נא ולין (שופטים יט ו), ויתן את צפורה בתו למשה (שמות שם שם), כיון שנטל בתו קבע עליו לרעות צאנו, שנאמר ומשה היה רועה (שם ג א), מהו היה רועה, אמר ר' יוחנן, כל מי שנאמר בו היה, הוא היה בתחילתו, והוא היה בסופו, הוא היה בתחלתו כשר, ובסופו כשר, רבנין אמרין כי מי שנאמר בו היה, זן ופרנס, אמרו לו והרי והנחש היה ערום (בראשית ג א), אמר להן הוא יה מתוקן לפורענות, אמרו לו והכתיב וקין היה עובד אדמה (שם ד ב), אמר להם אף הוא מתוקן לגלות, אמרו לו והכתיב והיה (כי) [כאשר] נלכדה ירושלם (ירמיה לח כח), אמר להן סימן יפה היה לה, שאילולי שנלכדה ירושלים נתאכלו שונאיהן של ישראל. ר' לוי אמר כל מי שנאמר בו היה ראה עולם חדש, לפיכך ומשה היה רועה.