The advantage is, that instead of 8 bits per colour channel, you get 12 or 14 bits.
That means you can pull details into blown-out highlights, 2-4 f-stop beyond what is in the JPEG.
Typical demo of RAW is to show a photo taken indoor, and with a white window, and the use highlight/shadown to...