Consider Gauss's law for gravity, in its differential form:
$$\vec{\nabla}\cdot \vec{g}=-4\pi G\rho,$$ or in its integral form:
$$\iint\vec{g}\cdot d\vec{A}=-4\pi G M.$$
This law intuitively makes sense. If no matter is present no net flux is going through a surface enclosing a volume if a mass is present in this volume.
But what if we consider an unbounded, continuous, and homogeneous distribution of mass? The value of $\vec{g}$ is zero everywhere in the distribution. So the surface integral of $\vec{g}$ over every closed surface is zero. This clearly contradicts Gauss's law, which says that this integral has the value $-4\pi GM$, $M$ being the total mass ($\rho dV$) inside the volume.
why is that so? Is there a mathematical reason (though I can't see why this should be the case) or is the existence of the proposed mass distribution just not realistic? Or what?
I make an edit because I think I made a mistake. Concerning the interpretation of Gauss's law. In evaluating the surface integral (so I think), one has to take the value of the $\vec{g}$ field at the surface. One must only consider the $\vec{g}$ field produced by the mass inside (and on) the surface. Which is perfectly well defined! When one has a distribution of electric charges one can encapsulate some of them and calculate the Gass integral. The integrals of the other charges cancel (they are outside the shell). As long as the distribution is finite. If the distribution is unbounded, you can't say anymore that the fields produced cancel. Simply because the field they produce on the shell enclosing a bound part of the distribution is unbounded (infinite), and in this case, the integral is not well defined. Unbounded values (infinities) just don't cancel when summed in every direction.
Somehow I think this question is connected with this question that was asked two days ago. The question asks if it's allowed to consider continuous charge distributions in Maxwell's equations. Can we consider continuous mass distributions in classical Newtonian gravity? If we consider discrete mass distributions we can imagine a surface around every mass, or collection of masses. The contribution of the outside masses to the total gravitational flux through the surface is zero. Only the masses inside the surface contribute to the total flux. The integral form of Gauss's law refers to flux (surface integral), while the differential form refers to local (point) values. On a planet in a universe with an unbounded amount of discrete masses, I will still be able to stand, i.e., there is a force of gravity. The flux through the surface surrounding the planet, due to all other masses, will be zero though. Or not?
But what if we make the distribution continuous? I won't be able to stand on the planet anymore (apart from the fact that I can't walk through a continuous mass distribution). There is zero gravity. The contribution to $\vec{g}$, on a point of the enclosing surface (of the planet, which has now become a sphere of continuous mass surrounded by an unbounded amount of continuous mass), will be the sum of two unbounded contributions: that from the unbounded mass residing in the space on one side of the tangent plane to the point, and one on the other side. They will cancel $\vec{g}$, for each point on the surface) caused by the mass inside the surface. Although the two contributions are infinite, the difference will be finite. I vaguely see a connection with an affine space (and with renormalization in quantum field theory: here infinite masses are rendered finite, but one can also keep the masses infinite and just look at mass difference; ohooooh, what I've written?).
So Gauss's law doesn't apply for continuous, unbound masses (ohoooh, what I've written? If we make the continuous distribution discrete (an unbounded number of separate continuous mass distributions), then we can walk on every mass in this distribution (if they are big enough). And we can place an enclosing surface around each mass and see that the force of gravity is non-zero at the surface of each mass.
Ohooooh! I'm sure I've overlooked something (mathematical rigor?).
The integral form of Gauss's law is (for me) much easier to digest than the differential form (which is the one that allegedly caused a problem in the linked question). For example in empty space, the integral form is obvious, but what about the differential form? Indeed, $\rho$ is zero out there, but $\vec{g}$ doesn't have to be.