Schwarzschild metric is given by (Carroll, chapter 5) $$ ds^2=-\left(1-\frac{2GM}{r}\right)\mathrm{d}t^2+\left(1-\frac{2GM}{r}\right)^{-1}\mathrm{d}r^2+r^2d\Omega^2 $$ where $M$ is the total mass of a gravitating body. According to the text book, this can be derived from the Einstein equation in vacuum $$ R_{\mu\nu}=0 $$ using the spherically symmetric condition.
My question is why there is the $M$, instead of a term which looks like $\int\rho(r)\ \mathrm{d}V$ or $\int T_{\mu\nu}(r)\ \mathrm{d}V'$ shows up in Schwarzschild metric? Isn't it the inverse square relation ($F\propto r^{-2}$) that makes it possible in Newtonian gravitation to treat spherically symmetric mass distribution as a mass point? So how does this come true here in GR? Thank you in advance!