Why is Joseph's genealogy included in the Bible
I have always thought this is a mistake in a book which should have no mistakes, at best it is just something that shouldn't be there.
If you read Luke 3:23-38 you will see it has the complete genealogy of Joseph, now if Jesus was divinely begotten, he doesn't have a genealogy so what is this information doing in the Bible? I don't see it having any relevance to be included.
Anybody have an answer for this?