While the color depth of a JPG is 8-bits, it is not a linear 8 bits. The sRGB color space is gamma corrected (non-linear) and is roughly equivalent to taking the square root of a linear pixel value.
The same thing holds true for a processed RAW image as well.