We logically would think that the angel would protect Joseph and Mary and baby Jesus from Herod but no, he instead told them to go to Egypt. Could not the angel supernaturally stop Herod killing baby Jesus? Yes he could. But that is not the way God wanted to happen. Most people would assume the angel supernaturally would protect the Son of God.
But God’s ways are mysterious for us humans to understand, because his thoughts are higher than our thoughts. It is similar in many ways for many things happening in our lives. We think that this way is better or the other way, but somehow, God has a different way and choice for us, which could appear to be not the choice we would make, but nevertheless, he makes the best choices for us, even when they seem mysterious.