If we compare film and digital photography, you can think of RAW as a digital negative, and JPEG as the final print. In the old days of film we took our negatives to the camera shop for processing and they gave us back a set of prints. How those prints looked, would often depend on how good the processing lab you used was. Go to the cheap one at the pharmacy and you would get a spotty teenager who would feed your negatives into a machine, press a few buttons and then give you what came out the other end! But go to a professional lab and you would get a professional who would work hard to get the best prints possible from your negatives. It's not a simple case of making a print from the negative. And this is also true with digital photography.
When you shoot in JPEG, the camera's digital sensor captures the RAW data, it then transfers this RAW data to the camera's internal microprocessor (mini computer if you prefer), which then processes the photo to produce the JPEG file. How this JPEG looks very much depends on the picture style you have set your camera to. If you have set it to landscape, the camera will then boost contrast and colour and sharpen the image. If you have set it to portrait, it will try to produce a softer image with more natural looking skin tones. Either way, the camera manipulates the data and makes the choice for you. In general, camera manufacturers are catering to the average user and assume that if you are shooting in JPEG, you are not a professional and therefore want a nice colourful image with lots of brightness and contrast. And what's more important is that to give you such a small file size, the camera then discards all the data that was not used and not only saves enough to give the photo it created, but also compresses this data. Therefore, each time you edit or re-save a JPEG you are losing quality and slowly destroying the image.