The 3 magi went first to Jerusalem rather than directly to Bethlehem. Martin Luther had thoughts on why that was:
“Here we ask why Christ did not lead these magi up to Bethlehem with the star, but instead permitted his birth, which was now known, to be searched for in Scripture. He did this to teach us to cling to Scripture and not to follow our own presumptuous ideas or any human teaching. For it was not his desire to give us his Scripture in vain. It is in Scripture and nowhere else, that he permits himself to be found. He who despises Scripture and sets it aside, will never find him.”
Luther, Martin. “The Gospel for the Festival of the Epiphany, Matthew 2:1-12” from his Christmas Postil (1522) Luther’s Works Vol. 52. Philadelphia: Fortress Press, 1974, page 171.