And he arose and took the child and His mother by night and departed into Egypt,
And was there until the death of Herod, in order that what was spoken by the Lord through the prophet might be fulfilled, saying, "Out of Egypt I called My Son.''
Christ was found in Bethlehem. This discovery of Christ created trouble. God used this trouble to bring the young child out of Bethlehem to Egypt (Matt. 2:13-18). Hosea 11:1 prophesied that Jesus would be called out of Egypt. Without the trouble that occurred after Jesus was found in Bethlehem, there would have been no occasion for Him to flee to Egypt.
This is very meaningful. The wise men made a great mistake, but their mistake offered God the opportunity to fulfill His prophecy. But do not make mistakes purposely. That will not work. Try your best to do things right.