AGC ensures that low amplitude samples are fully amplified and get maximal number of bits, so that even small features are visible and not get rounded off AGC also ensures that high amplitude samples do not saturate the A/D and therefore the energy can be calculated correctly and not trimmed-down.