It comes down to where the gain is in the chain.
For the compressor, the gain is last in the chain; the comporessor has alrewady done its compressing so its just a volume control in this case and won't cause distortion unless you run the master output into the red.
For the guitar amp, the gain is first int he chain, and it controls the level of the guitar into the preamp. Turning up the gain increases the level into the preamp, which makes it react differently to the signal. The hotter you run it, the more the the amp will react, to the point of distortion and beyond.
In other words, turning up the output after the compressor won't add distortion because there wasn't any to start with, but turning up the level into the amp will make the amp components react in their unique characteristic way, by adding saturation/distortion