Happy Groundhog Day! Why do I have an output when my analog input is grounded?
The most common reason is ground noise*. A superstition among EEs says that "ground" is the place where good signals go when they die – a sort of zero-impedance, zero-potential panacea wherever you find the triangle or the dangling worms. A real-life ground has finite impedance, so a current is flowing between two "ground" points will cause a potential difference (PD) between them. This PD often causes errors in precision (and even non-precision) circuitry. The current may be the return from the circuit's input or output connections, or it may be a current from some nearby system that just happens to flow through the circuit's ground conductor.
The three main strategies for minimizing the effects of ground noise are 1) minimize ground impedance, 2) isolate the grounds of sensitive circuitry from large or noisy currents, or 3) use differential signal transmission to isolate signals from ground noise.
1) It seems that some designers assume room-temperature superconductors have already been invented – and that copper is one of them. Some PCB designs have ground traces only a few mils wide, and the resulting voltage drops are humongous. Ground impedance is minimized by using the widest possible PC traces for ground and, preferably, having a whole uninterrupted layer of copper, known as a ground plane.
2) It is also valuable to have separate grounds for sensitive circuitry and for circuits drawing high currents. These separated circuits will need to communicate, so there is usually a single point, known as a "star point" and located near the power supplies, where these two grounds are joined to give a common reference potential. Most mixed-signal systems have analog and digital grounds separated in this way; when this is done the AGND and DGND pins of all ADCs and DACs should be grounded to the analog system ground.
3) If signals are transmitted differentially on two ungrounded "signal" and "return" wires, then ground noise is much less likely to affect their integrity, although common-mode noise may still cause some ill-effects.
It is not widely known that ground noise is what awakens Punxsutawney Phil on Groundhog Day. Ice is a better insulator than liquid water and when the ice around Phil's hole starts to melt ground currents start to flow, ringing a little bell to alert him.
* Device noise or offset is also quite a common cause.