Starting a book with a genealogy is, as others have said, not the most interesting approach. Evidently it mattered to the author, must have seemed very significant at the time.
My conjecture [believing that no-one truly knows, within a range of many decades, when this book was begun or when it was last amended] is that the gospels would first be put in written form near the time of Paul’s letters, for much the same reason those were written: to nail down church doctrine and practice when the movement had spread out of Palestine and was starting to include people who weren’t familiar with ‘what everyone knew’ back in Judea.
“Is this Jesus really Jewish, really a blood descendant of David?” — “Yep, here’s his family tree” etc.
“What about those stories we hear, that his father was a Roman soldier?” — “No, his mother’s husband was Joseph son of …. and he didn’t disown him.”
Later readers have observed… that the generations given here from Abraham to David, from David to the deportation to Babylon, from the deportation to Jesus’ birth, don’t really come out to 14 generations each. [I haven’t counted, myself.] The point is probably that these periods, of about the same length, are significant episodes in the history of Israel, that the birth of Jesus takes its meaning from its role in that history.
One remarkable feature… is that some of Jesus’ female ancestors are included. These are, of course, women whose stories were included in the scriptures — and it might be significant that these are women whose sexual history was slightly irregular. If the old argument: ” ‘virgin birth’ vs ‘had no father’ ” goes back this far — and it might — This may be implying: “Hey, God sometimes resorts to odd means to produce essential births.”
It does look like there was some sort of gossip — which would be consistent with a virgin birth, and also consistent with some more common irregularity — and that Luke’s significantly different birth story, which has Mary traveling to Palestine from Nazareth at the time, would make more sense as an effort to defuse such talk.
Two of the gospels get along just fine without birth stories, and why not?