I think the documentation is wrong.
Although we do not know what the calculation of the distance used is, we can guess that it is the calculation of the orthodromic on a sphere (i.e., the distance measured on the great circle that contains two points).
Regarding the radius of the sphere, I don't think it is calculated based on the location (precisely because they are looking for speed of calculation). Rather, I suspect that the radius of 6378137 m is used. Which is the equatorial radius of the WGS84 ellipsoid, and it is the radius that Google uses to project its map services onto the plane.
Why does computing on a sphere causes this error?
Because the difference between what an arc of circumference measures with respect to an arc of an ellipse. The error varies, although not proportionally, with the width of the arc.
I think the documentation is wrong because the geodesic that passes through two points of equal latitude (except that they are on the equator) is also an ellipse on an ellipsoidal surface. The great circle (on the sphere) does not follow a constant latitude, but rather widens its maximum or minimum latitude depending on the difference in longitude between the two points. So much so that if they are 180 degrees apart in longitude, the orthodrome passes through a pole.
This seems weird because we often want to use some local CRS when wanting accurate distance.
Only if we can't compute the shortest distance on the reference surface (usually an ellipsoid). In that case, instead of using a global projection we look for a local projection, so that the computation of the planimetric distance is not so far from the curved shortest distance on the reference surface.