How the great Galactic structures formed