Why does the Torah in Parashat Vayigash, Bereishit (46:12) list Yehuda’s two dead sons, Er and Onan, among the seventy who descended to Egypt?
The commentators on the Pasuk pick up on that and bring different explanations. The Or HaChaim (Rabbi Chaim Ben Attar) suggests that it's because Yehuda is the "Yabam" and in a way he is the one to carry the name of the deceased as they die childless. Similarly he brings another explanation that it's to find some merit points for them that they were influenced by the Egyptian culture and they were not bad essentially. Rabenu Bachya brings a kabalistic comment – you can read it inside. Kol tuv