Matthew 1; Matthew as an Editor
The book of Matthew was written for a Jewish audience. In his book, he often shows the division between "their synagogue" and "the church".
Theoretically, Matthew has two main sources from which he likely drew:
However, it is important to recognize that Jewish culture in the first century was very much orally based.
Matthew used a couple techniques in his Gospel to emphasize what he likely saw as important for his audience, the Jews.
In his attempt to portray Jesus as the new Moses, he outlined five major discourses by Jesus:
He ends each of these with "And it came to pass, when Jesus had ended these" sayings, teachings, or parables, except the last one, where he says "And it came to pass, when Jeus had finished all these sayings."
In using these five discourses, Matthew's intent may have been to create a Christian Penteteuch to emphasize Jesus as the new Moses.