Matthew 1:17, after the end of the genealogy, tells us the organization of the preceding text.
So all the generations from Abraham to David are fourteen generations; and from David until the carrying away into Babylon are fourteen generations; and from the carrying away into Babylon unto Christ are fourteen generations.
But there are some other interesting textual links. Matthew 1:2 mentions Jacob “the father of Judah and his brothers.” The next time we see a similar phrase, it is in verse 11, where it says “Josiah became the father of Jeconiah and his brothers…” The latter specifically says that it was the “time of the deportation to Babylon.” Exile.
And what also happened to Judah and his brothers? They went down to Egypt. It was to escape a famine, but it was still a movement away from the promised land. Exile.
The genealogy concludes with another Jacob, “the father of Joseph the husband of Mary, by whom Jesus was born…” Jesus himself will go into a form of exile. To Egypt first, but then to the grave. But his exile will be the one to end all other exiles.
The ending of the first fourteen generations is also linked thematically, of course, because David undergoes his own exile before he is crowned king. It’s a cycle that repeats…until it doesn’t.