I understand that a RAW file is non-destructive but have not actually ever been able to see the advantage of adjusting RAW images over JPEG images. What am I missing?
In analog colour correction, the original is a viewable graphic which is preprocessed in the sense that the make and model of film introduces a look. The original is colour managed through capturing an IT8 target for the look of the make and model of film.
In digital colour correction, the original is not a viewable graphic. Instead of applying preprocessing in the film medium, it is applied in the camera which incorporates a kind of colour preprocessing which is dependent on the camera manufacturer.
There is no one RAW preprocessing any more than there is one film preprocessing, e.g. see Wikipedia. Image data and the colour preprocessing is coupled in the RAW file format, so to speak replacing the analog original as it is before exposure correction / colour correction.
RAW can be considered the equivalent of the high bit image data captured in a drum scanner before exposure correction in the scanner software, application of the corrections to the capture, saving of corrected and downsampled to 8-bit to disk.
There were intermediary implementations of non-destructive colour correction, the best known of which was Live Picture for which Apple's former John Sculley was in turn CEO. Live Picture started with 8-bit scans and converted into a tiered image data format.
Layers and edits were stored in a resolution independent format that was independent of the image data format. One could manipulate 1Gb image data on a Quadra with a NuBus card, beating Photoshop by many miles.
When one was done with editing, the resolution independent edit file was applied to the resolution dependent image data file in a high-bit calculation using Apple ColorSync 2 as calculation and conversion engine and ICC profiles as device characterisations.
Essentially, Aperture is an implementation of this idea to digital cameras.
With regard to JPEG, then JPEG is a final export format and NOT an editing format. It is not simply a change in the bit, but a change in the colourant data. Internally, the channels are rotated to a CIE-like model and the chroma channels are crushed. Saving to JPEG once for output is workable, saving to JPEG twice in the course of colour correction should always be avoided.
/hh