Image layers allow detail oriented image processing. Not every image format allows working with layers – JPEG, for instance, combines all layers into a single image. The layers go all together, but JPEG image files become appropriate for any file distribution over the web and among different image devices. PSD is the native format of Photoshop, and the goal of the image format is to provide the most effective image processing solutions. PSD saves all the information about each image and allows editing separate image layers, but results in pretty bulky image size. As soon as you convert PSD to JPEG, processing separate image layers becomes impossible. PSD can definitely produce high quality images, and in case image quality is essential, this is one of the ways to keep it. JPEG compresses the images, i.e. some quality loss becomes inevitable.