Have a look in media_processing.conf. This controls what is created for each file type and what the default view version is.
JPG and TIFF are bundled together under the Image MEDIA_TYPES by default, but you can create a separate MEDIA_TYPE to process JPG and potentially other lossy formats like PNG etc. Just copy the image block and edit it as you need for JPG, then point the JPG format type (under MEDIA_ACCEPT) to the new type you have created.
This also contains all the settings for the size/quality of the derivatives that are created.