Why are galaxies so far apart? With the Big Bang, one would expect the distribution of mass to be somewhat uniform, but we have galaxies that have billions of stars and there are huge distances between galaxies.
Why is there is so much emptiness between galaxies? Like, the nearest galaxy is 25,000 light years from the Sun.
Think of it this way. Our Sun is near the outer end of our galaxy so we have literally a billion stars on one side but like nothing for the next 25,000 light years on the other side (assume we are on the edge of the galaxy for simplicity).
 A: Most of the universe is pretty empty in terms of the density you're used to in daily life. It's perhaps not that stars and galaxies are far apart, but that they are pretty compact.
This is because baryonic matter (as opposed to dark matter) can lose energy via electromagnetic radiation and hence condense to smaller and denser objects. This is only opposed by angular momentum (which cannot be simply radiated away) forcing disc-like structures such as the Galaxy and proto-stellar and -planetary discs.
One of the obvious answers is gravity, Galaxies are gravitationally bound systems of stars, interstellar gas and dark matter, often hosting a central supermassive black hole. So anything in its hill sphere will fall into the galaxy.
We also know that the universe is expanding which explains the large distance and emptiness because the objects are moving in relation to one another. Neither is moving through space, but space is expanding.
So two galaxies that used to be 1 billion light years apart are now 2 billion light years apart. The expansion of the universe is the formation of new space between the Galaxies.
A: According to the current Λ-CDM model of cosmology, vacuum (empty space) has an energy density of 5.4×10−10J/m3, and remains constant as the universe expands. Fitting the Λ-CDM model to precise observations of the cosmic microwave background determines that numerical value. The theoretical reason why the vacuum has this particular value for its energy density remains unknown. This "dark energy", unassociated with any ‘real’ particles, has caused the expansion of the universe, and now causes it to accelerate. It comprises 69.1% of the current total energy density of the universe.
Remember that mass equals energy divided by the square of the universal constant (m = E/c2). The total energy includes this dark energy, plus the energy of all matter (both visible matter and “dark matter”) and radiation.
(Looking at the second part of your question) one could extrapolate a hand-wavy hypothesis that says that since density remains constant as the universe expands, a kind of positive feedback such that ‘empty’ space — the quantum vacuum – creates more and more space and thus more energy and more potential mass as it expands.
This appears to make problems for our conception of mass/energy creation in the 1st law of thermodynamics. Oh well…
