In answer to your question as to why God chose Judah's descent for
Jesus, Judah being a son of the less beloved wife Leah.Jesus' ancestry includes really human and imperfect people. Judah
impregnated Tamar, whom he thought was a prostitute, producing Perez,
from whom Jesus descended (Judah legitimized his relationship to Tamar,
however).
Rahab, the foreign prostitute who supported Israel, became the mother
of Boaz, an ancestor of David and Jesus--
Rahab was redeemed but was a very human woman to start. Boaz himself
married Ruth, another foreign woman, not born to Israel, but
economically redeemed through the patriomony of her mother-in-law
Naomi, a relative of Boaz.Mary, Jesus mother, was suspected of immoral behavior but saved by a
dream given to Joseph, her spouse. Later, Jesus was accused of being
the son of an immoral woman because his paternity was in doubt by some.To me this shows that Jesus chose a human line which was truly human,
not entirely grand or imperial, to give us courage in Redemption. His
ancestral line was redeemed by Him in a special way, perhaps, many
times.He is truly the Son of God and the Son of Man.