You may not have the perfect photos, saved as RAW, but you have great flexibility in making adjustments. With proper conversion software you can manipulate parameters as white balance, hue, saturation, adjusting highlights, shadows, colors, сhromatic aberration (colour fringing) etc.
RAW format has a higher dynamic range which allows you to recover lost highlights and shadows in post processing. White balance, sharpness, contrast, colour saturation etc. can be adjusted and can be reverted back to their original settings without compromising image quality.
The advantage after processing is that your original RAW file is never changed nor is any information lost in compression. So your original information is always left intact.
RAW files stores 12 or 14 bits of information and not the 8 bits compressed format like in processed JPEG files. Compared to 8-bit JPG format that can only contain up to 256 shades of Red, Green and Blue colors (total of 16 million), 12-bit RAW images contain the most amount of information with 4096 shades or Red, Green and Blue (equivalent of 68 billion colors) and higher. Unlike JPG, RAW files utilize lossless compression, meaning they do not suffer from image-compression artifacts.