digital GND vs. power GND vs. analog GND

It matters when using analog signals where you don't want erroneous IR voltage offsets and
noise superimposed on the signals. The classic example would be an audio signal where a few mV
of noise makes the difference between acceptable and unacceptable.

All wires are resistors, just low-valued resistors. Put significant current down a wire and the two
ends are not at the same voltage. If that wire is a ground wire to some analog sensor that
voltage gets added to the signal seen at the Arduino. The worst case would be sharing ground
wires between a motor supply and a high-precision analog sensor. Thus you route the ground
return for the analog sensor separately to any current-carrying ground (such as the supply in
or one carrying significant current/power out.).