If it were not important, why would the CREATOR of all galaxies, The ALMIGHTY GOD, create Adam and Eve and ask them to be fruitful and multiply? Why would HE spend time listing the many ancestral trees mentioned in the Holy Scriptures? Would any child have been born if male and female spouses did not procreate? Knowing your identity is linked to knowing who you are and where you are from including your ancestors. In most instances, our purpose on earth is directly linked to the families we are born into or that we marry into and there can be legace/inheritance passed down to us that generations after need and use to maintain godly lifestyles. Take for example the life and descends from Abraham to Isaac, Jacob leading to David the King and eventually to our Lord YESHUA. Family is very important.
Genesis 36:1-5 Now this is the genealogy of Esau, who is Edom. Esau took his wives from the daughters of Canaan: Adah the daughter of Elon the Hittite; Aholibamah the daughter of Anah, the daughter of Zibeon the Hivite; and Basemath, Ishmael’s daughter, sister of Nebajoth. Now Adah bore Eliphaz to Esau, and Basemath bore Reuel. And Aholibamah bore Jeush, Jaalam, and Korah. These were the sons of Esau who were born to him in the land of Canaan.https://bible.com/bible/114/gen.36.1-5.NKJV
Genesis 5 This verse begins with the genealogy of Adam, stating that God created Adam in his likeness, blessed him, and named him on the day of his creation. It also says that after Adam lived 130 years, he fathered a son named Shet, and after Shet was born, Adam lived another 800 years and had more children.
Matthew 1:1–17 This passage begins the Gospel of Matthew with the genealogy of Jesus Christ, the son of David, the son of Abraham. It lists 27 generations from David to Joseph, and notes that there were 14 generations from Abraham to David, 14 from David to the exile to Babylon, and 14 from the exile to the Messiah.
Luke 3:23–38 This passage begins the genealogy of Jesus with Jesus, the son of Joseph, and follows his line back to Adam, recording 77 generations. It lists 42 generations from David to Joseph, which differs from Matthew’s list, and also disagrees on who Joseph’s father was.