What is the phenomena behind gas giants like Jupiter and Saturn having a large number of moons as compared to other planets. Were the present state moons a part of their parent planet long time ago ?
You could look at the question from the other perspective i.e. why don't the inner planets have moons? The Earth only has a moon because it (probably) got hit by another planet while it was forming, and Mars' moons are probably captured asteroids.
Having said this, we don't know the answer to this question either. It's been suggested that the inner planets formed a lot closer to the Sun than they are now, and migrated outwards due to interactions with dust surrounding the Sun (the solar wind has since blown away this dust). It's possible that all the small bodies that hadn't aggregated into planets got ejected from the inner Solar System by interactions with the inner planets.
If you accept this argument then I guess the outer planets got moons because they were more widely spaced so the system was less chaotic. There's also a lot more junk floating about because the solar wind was too weak to blow away all the small particles.