Jesus has a checkered lineage. But that lineage will not define him in its failures. He is fully human, yet without sin. But he is also fully God. The mystery of the incarnation is therefore twofold. How could God become a man? I don't know, but he did. And Why did God become a man? This I know: to save and redeem us, to seek us and bring us with him into present purposefulness (apart from any human lineage), and eternal joy and bliss.
Thanks be to God!