JPEG mainly compresses data by using a set of 2D cosine waves to approximate an image. This may sound ridiculous at first, but a surprisingly low amount of cosine waves with different frequencies and amplitudes are necessary to approximate a function. (This process is called a Fourier Transform).
If the colors in the image varies greatly, the approximation will perform worse.
Various other alterations to the colors of the image will also occur that enables a better approximation.
All of this reduces the quality of an image, which is not preferable when you want to layer on even more edits with your photo editor.
Latest Answers