How is it that galaxies merge and collide but the universe is expanding and everything is moving away from everything else?
Whether or not galaxies merge depends on how strong the gravitational attraction is between the galaxies and whether the universe's expansion is more powerful than gravity. Gravity affects everything ...