These are the sons of Israel: Reuben, Simeon, Levi, Judah, Issachar, Zebulun,
Dan, Joseph, Benjamin, Naphtali, Gad, and Asher.
Malbim comments: The precedence of Dan before Yosef (Joseph) is found one other time in the Torah reading of Masei, and the sages stated in a midrash, that in merit of Dan, Yosef (Joseph) and Binyamin (Benjamin) were born.
From Rashi’s commentary to Bereishit (Genesis) chapter 30, we better understand the link between the three sons.
But first here is a review of chapter 30:
When Rachel saw that she had borne Yaakov (Jacob) no children, she became envious of her sister; and Rachel said to Yaakov, “Give me children, or I shall die.”
Yaakov was incensed at Rachel, and said, “Can I take the place of God, who has denied you fruit of the womb?”
She said, “Here is my maid Bilhah. Consort with her, that she may bear on my knees and that through her I also may have children.”
So she gave him her maid Bilhah as concubine, and Yaakov cohabited with her.
Bilhah conceived and bore Yaakov a son.
And Rachel said, “God has vindicated me;* indeed, [God] has heeded my plea and given me a son.” Therefore she named him Dan.
Rashi:
אשר מנע ממך WHO HAS DENIED YOU —You say that I should do as my father did; but I am not circumstanced as my father was. My father had no children at all, I, however, have children. From you He has withheld children and not from me.
Rachel responds:
ואבנה גם אנכי AND I ALSO MAY HAVE CHILDREN — What force has “also”? She said to him, “Your grandfather, Abraham, had children from Hagar and yet he girded up his loins (actively interceded) for Sarah and she afterwards was blessed with a child”. He replied, “But my grandmother brought an associate wife unto her house”. She retorted, “If that is what prevents me being blessed with children, הנה אמתי BEHOLD MY HANDMAID” etc.
ואבנה נם אנכי AND I ALSO MAY HAVE CHILDREN through her as Sarah was built up through her handmaid.
The Word Dan in Hebrew, means, he judged.
Rachel according to Rashi was making a statement, that G-d had initially judged her and found her to be liable. Then he judged her again and found her to be worthy.