I have been thinking at this for a couple of days now: why are stars grouped in the massive collections that we call galaxies? I can assume that in the very early Universe, matter was grouped in these areas, that matter interacted thus resulting in the formation of stars. Then, the gravitational pull between these stars made possible grouping them in what we call galaxies. But why was the matter scattered in these clusters in the early Universe? Why this uneven distribution throughout the Universe? Thanks!