Although the laws of inheritance require that the eldest son receive a double share, we know that the stories of the patriarchs in Sefer Bereishit do not follow this rule.
Rabbi Ḥelbo asks Rabbi Shmuel bar Naḥmani why Ya’akov chose to take the double portion of the firstborn from Re’uven and give it to Yosef. In response Rabbi Yonatan is quoted as teaching that the right of the firstborn was really supposed to come from one of Raḥel’s children – after all, she is the one who Ya’akov really wanted to marry, and the Torah identifies Ya’akov’s toladot – his descendants – as Yosef (see Bereishit 37:2). God, in His mercy, gave the firstborn to Leah, but He returned it to Raḥel due to her modesty.
Both of these assertions deserve explanation.
1. Leah was deserving of God’s mercy, according to Rav, because she spent much of her time crying and lamenting her destiny. For she heard the talk in the public thoroughfare, where people were saying “Rivka has two sons, and her brother Lavan has two daughters. The eldest will marry the eldest and the youngest will marry the youngest.” Fearful that she would end up marrying Eisav, the pasuk teaches that she “cried her eyes out” (see Bereishit 29:17). The Maharsha explains that it was common knowledge that in Avraham’s family marriages were arranged within the family, so the expectation was a natural one.
2. Raḥel’s modesty that returned the rights of the firstborn to her is explained based on the Gemara’s interpretation of the passage in Bereishit (29:25) that it was only the morning after that Ya’akov discovered that she was Leah and not Raḥel. The Gemara explains that he did not realize this the night before because Raḥel had shared their secret code with her sister so that she should not be embarrassed publicly when Ya’akov realized that he had been deceived.