I'm not sure which sketch you're talking about. maybe this will help:
Each of the pins capable of Analog Input is also connected to some digital circuitry as well as the ADC MUX. This connection is disabled when the ADC is enabled. It's shown as part of the "IO Ports" documentation (Figure 13-5 on my data sheet)
The orange line continues on to the ADC Mux, shown in 23-1:
Arduino documentation is probably simplified, only dealing with one functionality at a time.

