Joseph is commanded by the angel to take the Child and Mary out of Judea and into Egypt and wait for further direction from God. This was so they would escape Herod who was planning to kill Jesus (Matt. 2:13).
We would do well to remember that God doesn’t always act in the moment. His wisdom dictates what he does and often in his sovereign will, waiting is best. This means that trusting him involves waiting on him.
Joseph obeys and remains in Egypt until Herod dies.
“So Joseph got up and took the Child and His mother while it was still night, and left for Egypt. He remained there until the death of Herod. This was to fulfill what had been spoken by the Lord through the prophet: ‘OUT OF EGYPT I CALLED MY SON’ ” (Matt. 2:14-15).
Now God could have just taken Herod’s life immediately and not subjected the family to a dangerous trip down into Egypt but he doesn’t and we must trust his wisdom. God exposes us to test our faith yet all the while he has us covered.
While they were in Egypt, Herod did slaughter all the Jewish male’s 2 years and under, according to the appearance of the star, but it didn’t matter, the Child was safe. But what about the other children? God could have prevented their murder. God can prevent all tragedies, but he has reasons which we do not know or understand. But he is not cruel and in a way we don’t understand, such allowance glorifies him and accomplished his perfect will. It is to this reality that we must bow our wills and trust that in love, he will make all things right.