A Jpeg is limited to 8 bits per channel whereas the RAW image has been demosaiced to 16 bits per channel (even though my camera doesn't capture a full 48 bit image).
The previous Jpeg's highlights are clipped/blown out whereas the RAW tonality is relatively intact even though it took some work to salvage. The RAW's tonality is acceptable but unfortunately the image itself is weak and unusable.
The Jpeg has not been tonal adjusted from out of camera. Both images have been cropped and down sampled for web display.
This example addresses 8 bit image's lack of enough highlight information but 8 bit images also can also lead to posterization when areas of tone in an image need to be stretched out/separated.