It then strips away all the data it decides to be unnecessary and creates a JPEG file and deletes the Raw data. This JPEG file is only a fraction of the size of the RAW data file. You can then take that file and edit it with a pretty much any photo editing software.
Well sort of. First. Decisions about what is or isn't stripped away as unnecessary for a JPEG were made long ago by the
Joint
Photographic
Experts
Group.
JPEG - Wikipedia, the free encyclopedia
While digital cameras make Raw files having a 12-bit or 14-bit color depth. JPEG is limited to having an 8-bit color depth.
Because of the limited bit-depth, JPEGs have very little editing headroom. Some poorly made in the camera JPEGs have no editing headroom at all.
None of the original luminosity data is stripped away, because we humans need that information. What we don't need in the final image is all the colors, which is why JPEG can have an 8-bit color depth.
In addition to reducing the bit depth, JPEG also locks groups of image pixels into 8x8, 8x16, and or 16x16 pixel groups which are known a Minimum Coded Units or MCU's.
Limiting the bit depth to 8-bits, and creating the MCU's is the 'compression' that makes JPEG files smaller in size. (Note: image size is not affected, and no pixels are discarded.)
The reduced bit depth and the MCU's make the editing of JPEGs problematic, particularly when a scene has smooth gradients, like a cloudless sky. Posterization and banding are common JPEG editing artifacts seen in smooth gradients after an edit has been applied.