Aeneas was the best Trojan warrior, whose mother was the goddess Venus. In the minds of the first followers of Jesus in the first ten decades of the Common Era, the three figures of Joseph, Mary, and Jesus going to Egypt are the counter-equivalent of the three figures of Aeneas, his father Anchises, and his son, Julus leaving Troy as it was burning, immortalized in the epic Aeneid. The Gospel account of Matthew is basically about the battle of religious beliefs during the first 100 years C.E.
Open political expressions were suppressed so their stories were rich in symbolism and metaphors. The Flight into Egypt expressed the possibility of being returned to a life of bondage under the Romans.
We see all Biblical stories as plain narratives. The question did not arise in the early Christian minds on why despite the story of Exodus or the 40-year journey of the Jewish people towards freedom and the Promised Land away from Egyptian oppression, the Holy Family would choose to go back to Egypt, This is the story of the flight into Egypt that the Holy Family took, upon learning that Herod the Great wanted to kill the newborn child.
Modern readers of Matthew’s account may not see the hidden story which the very early followers of Jesus saw-an event that followed the good news about the birth of Jesus. It provides a very good story for Christmas plays and for the Nativity Scene-with shepherds, sheep, and the three wise men from the East, bearing gifts. The Christmas story that every school child learns in school is a conflated version of the accounts of Jesus’s birth in the Gospel According to Matthew and to Luke.