Matthew and Luke, however, both chose a birth story as overture to their own stories of Jesus. Let's examine Matthew's overture to see what he was trying to say about Jesus with his birth story. For Matthew, Jesus is the Messiah, long-awaited by his people, but a Messiah who came as a New Moses. You and I, by the way, understand new rather differently from the way that Matthew did. We think of "new" as "better" and therefore replacing the obsolete old. But for the ancients, the old was good and the new was always suspect--except as the old renewed, transfigured, and fulfilled. That is why, for example, Matthew started his story of Jesus-as-Adult atop a (re)new(ed) Mount Sinai, giving a (re)new(ed) Torah, and proclaiming "you have heard of old, but I tell you now" in Matthew 5-7. Torah-renewal, in other words, not Torah-replacement. That is why Matthew has Jesus explicitly warn, "not to think that I have come to abolish the law or the prophets; I have come not to abolish but to fulfill."
In composing his birth-as-overture, therefore, Matthew had to write aprologue about Jesus the Messiah, the New Moses of Jews and Gentiles alike. And here was the most difficult part. He also had to foreshadow danger and deliverance, lethal human opposition but eventual divine vindication. He had to hint about crucifixion and resurrection in creating his parable about the newborn Jesus. Finally, he had to do all that in the short space of those two initial chapters.
You can debate whether Matthew's birth story is history or parable. In my own view, it is clearly a deliberate and very powerful parable. But what does it mean? And there is an even more important question which still presses, whether you take it literally as history or metaphorically as parable. It is also the only question Matthew would have thought worthy of debate: Who is your King and what is your Rule? Is it the violent power of a Herod or the non-violent power of a Jesus?
Back, then, to Matthew's birth story. His obvious strategy was to describe the birth of Jesus in parallel with the birth of Moses in Exodus 2. In that story, Pharaoh of Egypt tried to destroy the Israelites by killing all their male infants--but the bravery of the Hebrew midwives, the strategy of his mother Jochebed, and the decency of Pharaoh's own daughter (all females, you will notice) saved the child in his papyrus basket among the reeds of the Nile.
Fortunately, however, there were available several versions of that Moses story which retold the Hebrew original from Exodus 1-2 in Aramaic translations and commentaries. They not only retold it, but they also expanded upon it and improved its narrative coherence on precisely the first two problems--the King's Decree and the Parental Crisis. They never, of course, tried to add, subtract, or change the Child's Escape--any storyteller would recognize the difficulty of improving on that section!
First, the expanded version of the King's Decree is given in the Jewishhistorian Josephus' Jewish Antiquities 2.205-206: "While they were in this plight, a further incident had the effect of stimulating the Egyptians yet more to exterminate our race. One of the sacred scribes--persons with considerable skill in accurately predicting thefuture--announced to the king that there would be born to the Israelites at that time one who would abase the sovereignty of the Egyptians and exalt the Israelites, were he reared to manhood, and would surpass all men in virtue and win everlasting renown. Alarmed thereat, the king, on this sage's advice, ordered that every male child born to the Israelites should be destroyed by being cast into the river."