vffgaston:
As many other characteristics of this microcontroller, this parameter is not well docummented and this behaviour has no apparent reason.
Yes it is well documented and their is a reason.
It is the sample and hold capacitor on the input to the A/D. Doing just a simple analog write to an input channel switches the input analogue multiplexer to the new channel and starts a conversion. There is little time for the sample and hold capacitor to acquire the same voltage as the newly switched input if the input of that source has a high impedance. It is also worse if the previous channel that was measured had a large difference in voltage than the previous one.
A capacitor allows more rapid charging of the sample and hold capacitor as it equalises voltages quickly especially when the external capacitor is >> than the internal one.
The two samples method allows the sample & hold capacitor to charge up to the input voltage during the time the first sample is taken and then at the second sample it hopefully is at the correct voltage. With much higher impedances it will not be fully charged and then you should introduce a delay between the two samples.
All the information to deduce this is in the data sheet, and promulgated almost weekly on this forum.
- Do not connect sensors without disconnecting the whole system.
Do not do any sort of wiring up to a system that is powered up. A lot of beginners have never been told this. Probably because of video tutorials made by people who don't know what they are doing.