I'm working with a new DSLR camera for a Computer Vision application and I noticed most of them default to saving in the lossy JPEG format. Initially, this caused some problems in my application and I started working with the RAW format, and saved them as png. I wondered what was the reason behind defaulting to JPEG as the compression encoding. Wouldn't it be better to support png as a default format due to its lossless quality and compression factors? (I assume DSLR users like to have quality and compression both). I'm curious as to whether this has a scientific reason I have not thought of.
Its force of habit and good enough. People were using JPEG's in their digital cameras before, so they stuck with it, and its plenty fine for viewing (and it produces pretty small file sizes as well). You're free to turn to some other compression method your camera supports.
Note that the RAW files often contain a lot more information than what a PNG would have anyway (like a bunch of stuff about the sensor), which can be exploited in programs like photoshop for editing, so from that perspective, you may as well have the RAW rather than the PNG (especially since the RAW is rather space efficient to begin with). You can also put in things specific to your camera there if you want.
Note that many cameras have the option to shoot RAW+JPEG so you simultaneously get both, which is good for viewing (use the JPEG) and editing (use the RAW).