well, the universe is a chaotic place, and the gravity from one galaxy, or from a group of galaxies, may disturb the motion of its near neighbors, causing them to collide. however, on average, when you compare two large enough chunks of space, the galaxies in one are moving away from the galaxies in the other.