Does not the Scripture say that the Christ will come from David’s family and from Bethlehem, the town where David lived?”

“from David’s family” = (2 Sam 7:16, Isaiah 11:1, Jeremiah 23:5, Ps 89:35-36).

2 Sa 7:16  Your house and your kingdom shall endure for ever before me; your throne shall be established for ever.’”

Isa 11:1  A shoot will come up from the stump of Jesse; from his roots a Branch will bear fruit.

Jer 23:5  “The days are coming,” declares the LORD, “when I will raise up to David a righteous Branch, a King who will reign wisely and do what is just and right in the land.

Ps 89:35-36  Once for all, I have sworn by my holiness—and I will not lie to David—that his line will continue for ever and his throne endure before me like the sun;

“from Bethlehem” =  (Micah 5:2).

Mic 5:2  “But you, Bethlehem Ephrathah, though you are small among the clans of Judah, out of you will come for me one who will be ruler over Israel, whose origins are from of old, from ancient times.”

These exceptions are raised by the people, not the writer. As Godet observes, “John often takes pleasure in reporting objections which, for his readers who are acquainted with the gospel history, turn immediately into proofs.” That is exactly what these were as shown by the following verses.

Mat 1:1  A record of the genealogy of Jesus Christ the son of David, the son of Abraham:

Mat 2:1  After Jesus was born in Bethlehem in Judea, during the time of King Herod, Magi from the east came to Jerusalem