
This pic shows the relationships in the Milky Way family
The MW is surrounded by star clouds, which formed in emission nebulae at the tidal boundary of the galaxy, the gravity source can not keep the disc stable outwardly for ever, and bits will spin off and go their own way at that place, this is the physical force that makes all similar disc galaxies the same size give or take.