Also it's not too hard to extend this. M_earth is a function of Earth's radius which goes into the definition of the meter. G is a function of earth's orbital period, which goes into the definition of the second. Further our definition of mass is based on the density of water, which is chosen because it is a stable liquid at this particular orbital distance from a star of our sun's mass.
But even that doesn’t matter, because the mass of the Earth didn’t play a direct role in the definition of the meter. If you take out the whole thing about the meter’s definition targeting half a toise, then all you have is “related to the circumference of the Earth”, and it would be a monumental coincidence if the mass of the earth and gravitational constant just conspired to somehow drop an unadulterated pi^2 out of the math.
Second, we'd be having exactly the same conversation if it happened to be g = 2pi^2, or 4pi^2, or any other reasonably artificial number.
Third, if you do the math, the mass of the earth and gravitational constant do conspire.
g = G * M_earth / R_earth^2
M_earth is approximately (4/3) * pi * R_earth^3 * Density_earth
G is approximately (2/3) * 10^-10 m^3.kg^-1.s^-2
We can eliminate our human units and rewrite it as
G = 2/3 * 10^8 / ( Density_water * Earth_orbital_period^2)
Put this all together and you get
g = 8/9 * pi * 10^8 * (Density_earth / Density_water) * ( R_earth / Earth_orbital_period^2 )
the ratio of the densities of earth and water is a dimensionless number that is independent of our units of measurement, and is approximately 5.5. With a little rearrangement we get
g = 88/9 * (pi/2) * 10^8 * R_earth / Earth_orbital_period^2
That 88/9 happens to be equal to pi^2 to within 1% error. This comes purely from nature.
1 m/s^2 is defined to be (pi/2) * 10^8 * R_earth / Earth_orbital_period^2 and thus we get the nice and neat g = pi^2 in metric units, but getting (pi^3)/2 * 10^8 in natural units is just as remarkable.