RAW files have a huge advantage over jpeg files when it comes to exposure latitude. With the same exact exposure, a RAW file can give you a good image while the jpeg file is a throwaway. Why is that? RAW files have a lot more exposure latitude than jpeg files. You can read all about it in The RAW vs Jpeg Exposure Advantage.