The point of the gain is to match the pre-out voltage from the component ahead of the amp in the signal chain (usually the HU) with the voltage required by the output stage of the amp to allow it to be compatible with as many different components as possible. If the gain is set too low for the source voltage, then the amp does not make full power (this CAN be used to limit the output of an amp to match levels within a multiamp system). If the gain is set to high the amp clips causing a massive increase in distortion and making a little extra (though not usable) power.