Gravitational field from earth/ center of mass

When calculating the gravitational field from the earth, why can we make the assumption that all of the mass of the earth is 'averaged' at the the geometrical center???

If we imagine the earth as a bunch of pieces, and then calculate the sum of forces from each of these pieces, would it not be different from imagining the earth as a single piece at the center with all of its mass?

What I mean is that a 'piece' of earth on the other side of the earth is pulling one me with a much much weaker force than a piece of earth that is right under my feet. The transition from the strength of the gravity from the earth that is close to me to the earth that is farther away is not linear, so why can we average the distances?

The story is that Newton invented calculus to answer that very question.

He created the idea of the 'integral' to sum the forces of every piece of the earth to find the net effect---and he found that the situation is identical to the entire mass of the earth collapse to a point at its center.

The calculation is, in effect, 'averaging' in a non-linear way (you take into account the inverse-square law---which is why the answer is what it is). But I think a better way to think about how it works is by symmetry. While the piece of earth directly below you pulls you more strongly, there are far more pieces of earth on the opposite side. And the amount more stuff on the other side, increases exactly so as to compensate for the inverse square decrease of the force.