The myth of the dangerous child was virtually universal in pre-biblical times: A child is born about whom certain prophecies have been made, and who represents a threat to a king or tyrant. The child is removed from danger and later returns in triumph.
The story of one of the better-known dangerous children was told in the epic poem "Mahabarata," written two centuries before Jesus' birth. In it, we are told of the Hindu faith's virgin-born Crishna who was prophesied to be the destroyer of the tyrant Kansa, who heard of it and ordered all the male children born at that time to be killed. Crishna survived because a heavenly voice warned his foster father to flee with the child.
Dangerous-child stories were told of Buddha, Zoroaster, Hercules, Oedipus, Romulus and Remus, and many others too numerous to mention; all of these legends pre-date that of Jesus by several centuries. The most recent dangerous-child story--that of Jesus, as told in the Bible by Matthew, deserves special attention.
"When Jesus was born in Bethlehem of Judea, in the days of Herod the king, there came wise men from the East to Jerusalem, saying: Where is he that is born king of the Jews? for we have seen his star in the East and have come to worship him. Then Herod, when he had privately called the wise men, enquired of them diligently what time the star appeared. And he sent them to Bethlehem, and said: Go and search diligently for the young child; and when ye have found him, bring me word." (Matthew 2:1-8)
The wise men found Jesus but didn't return to tell Herod: "When Herod realized that he had been outwitted by the Magi, he was furious, and he gave orders to kill all the boys in Bethlehem and its vicinity who were two years old and under. (Matthew 2:16)
This was just one more story so much like so many others, cast this time in the specific mold of Crishna: birth of a god-child, a threatened monarch, heavenly warning to the parent, and the escape.
The simple folk of that time were used to stories about these dangerous-heroic child-saviors and were awaiting their own; Matthew made sure his messiah candidate was qualified, so he invented the story above.
If all of these babies in Bethlehem and the surrounding area had been murdered by the Romans, there would have been unleashed a flood of contemporaneous lamenting poems, art, and journalistic accounts. But, extremely improbably, the story of the murderous Herod is found only in the gospel according to Matthew; nowhere else in the Bible is it mentioned, and no Jewish or Roman historians of that time says a word about this sensational event.
The Roman historian Cornelius Tacitus (110 AD), who went out of his way to record every misdeed of despots and tyrants, was completely silent. Silent also was Josephus (40 AD), the Jewish historian who provided a detailed account of all the lesser evil-doings of Herod up to the end of his life; not a word did he write about Herod's massacre of the innocent children.
The reason why such a manifestly ridiculous story for two millennia has been promulgated as truth by church fathers is partly given by an anonymous historian quoted by T.W. Doane ("Bible Myths and Their Parallels in Other Religions," T. W. Doane, p. 173.):
"The brow of many a theologian has been bent over this (Matthew) narrative! For, as long as people believed in the miraculous inspiration of the Holy Scriptures, of course they accepted every page as literally true, and thought that there could not be any contradiction between the different accounts or representations of Scripture. The worst of all such pre-conceived ideas is, that they compel those who hold them to do violence to their own sense of truth. For when these so-called religious prejudices come into play, people are afraid to call things by their right names, and without knowing it themselves, become guilty of all kinds of evasive and arbitrary practices; for what would be thought quite unjustifiable in any other case is here considered a duty, inasmuch as it is supposed to tend toward the maintenance of faith and the glory of God!"
Joseph F. Alward
"Skeptical Views of Christianity and the Bible"
http://members.aol.com/jalw/joseph_alward.html