The question still stands, Why?
OK, yes it makes sense that they went to Jerusalem first.
We know the result of this series of events was the murder of a significant number of innocent children, so why?
We know that it was decreed in ages past, but why?
It seems that it must have been important that these children where killed because it seems that God kinda went out of his way to make sure it happened.
What would have happened if the Magi went back to Herod? God could have told Joseph to leave before Herod reached Bethlehem. If so then what would he have done, would he still have murdered all the other children, knowing that Jesus was not there? (Assuming he talked to owner of where they stayed, and he told Herod that they had already left, not knowing where?)
Sorry lot's of speculation, but I was thinking about this over Christmas, and as above, it seem like it must be an important part of the story, but it also seems terrible.
Edit: Actually, I was thinking that perhaps the Magi made a mistake in going to Jerusalem, that they never should have gone there, but they did because that was the logical place to go. But then what about the prophecy, and also God could have warned them not to go to Jerusalem.