Why did Mary take Jesus to Egypt?

King Herod was looking for them so he could murder Jesus. Herod had been told that Jesus was born King of the Jews; and since Herod was the King he believed that Jesus would depose him if he let him live.