We're about to enter the murky world of colour theory here, so if I stray too far in over-simplifying for the sake of brevity, could someone please stop me.

Not 256 colours. Such a palette would equate to a GIF. 256 colour tones. Or 256 tonal variations of one colour. So there's yellow, which can be a very, very dark yellow (almost black) or a very, very light yellow (almost white).
However, a greater bit depth extends the levels considerably, out to 4096 tonal values of yellow in the case of 12-bit colour. You begin now to understand why RAW files are so large.
With that range of tonal values in an image, you have a much greater capacity for reproducing colour as it appeared naturally. Whether your output - a printer, a projector, or an LCD display - can accurately display all those colours is a different matter, but if that tonal range is there in the first place, you stand a much greater chance of seeing it in the output. The example of a banding sky in a landscape is a good example of a limited tonal range.
Landscape photographers, for whom maximum recordable detail is paramount, know and understand this and choose to use RAW. But I would suggest there are many more instances where RAW's extended tonal range is useful.
This week, my daughter has been shooting a tennis tournament. Exposure is a real challenge. On the one hand, the player will often be dressed in white. They will also be wearing a cap or sun visor, which throws a dark shadow over their face. On top of this, you are always shooting at a fast shutter speed - 1/1000 or faster, and if the light fades you may need to crank the ISO to attain fast shutter speeds.
We've proven to ourselves that shooting RAW in this situation gives us the greatest measure of control in post, where we can recover details in highlights (white shirts) and shadows (player's faces) much better than when using JPEG. It also means we can "push process" the photo (to use an old-school term) while not losing colour detail. That is, she can deliberately under-expose up to two stops for a required shutter speed and we can satisfactorily fix the exposure in post. If you try this with a JPEG, you just end up with a very coarse image. Any of you who have used iPhoto's Shadows slider to fix an under-exposed image may know what I mean.
The only way to really understand the pros and cons of RAW v JPEG is to test it for yourself. Shoot a well-lit, high-contrast scene with plenty of fine detail and vibrant colours. A botanical garden on a fine spring day is the perfect subject. Be sure to include people for skin tones. Shoot it at the highest quality JPEG setting, then shoot it in RAW. Then import the images and experiment with changing image parameters. Shift exposure, shadow detail, colour balance, punch the contrast, go wild. What you should notice is that there is a much greater latitude for making adjustments in the RAW than the JPEG, and this comes down to having an extended tonal range through which digital colour values can be shifted. A caveat. The quality of your camera's sensor, lens quality, your display, the software you use to interpret RAW files, and the accuracy of your eyesight all play a part in this exercise, so YMMV.