It was very important that the Messiah's lineage came from the prophesied group. Vain geneaologies are condemned, but to the Jews there are requirements for the royal line of kings. These were not vain.
I see that and thank you for pointing it out, but I still wonder whether I am correct in recalling some Biblical admonition concerning geneologies?
Of course, 1 could point out that (as far as we know), Jesus is NOT actually descended from David - who was the ancestor of JOSEPH.
Joseph was not actually part of Jesus' gene pool.