We were very lucky seeing how migrating gas giants seem to be more of a norm in the evolution of planetary systems.
According to the article and guessing on my part, migrating Jupiter was instrumental in the formation of the inner planets. The real trick is how Saturn was able to pull Jupiter back to where it is today.