Hi cai! Galaxies stay together for the same reason we are stuck to the ground here on Earth. Gravity!! Gravity is interesting because it is strongest on large scales, where there is a lot of mass! Galaxies are huge, full of billions stars. These stars are held together in the galaxy by their mutual gravitational attraction. There also happens to be a supermassive black hole (a strong source of gravity) at the center of each galaxy. They helps keep it all together. Pretty crazy – baseballs and galaxies obey the same physics!