In response to your comment above: say I have a 16-bit file, so I can make more (or better) corrections. Since uploading the file to the screen or to a printing lab requires converting the file to JPEG and through sRGB space (in my case) anyway, what difference can you see in the end result, if any, whether you start out with RAW, TIFF or JPEG? Do I miss something here?
Your question opens up a big topic David, but lets see of we can make answer that is relatively short and understandable.
I'll start with a very simple illustration: If you want to paint your house and you only have a single can of paint, you may have a problem. If, on the other hand, you have twenty-five cans of paint you will probably be fine.
This illustration, as a principle maps very well to image editing.
We will talk about bit depth first and then move onto the matter of colour spaces (sRGB etc) afterwards.
Everything in the digital world ultimately devolves to numbers and how those numbers are represented on digital devices.
A bit in hardware terms is really a single circuit. That circuit can be charged or not.
In numerical (digital) terms 0 represents an uncharged state and 1 represents a charged state.
(In technical reality these circuits are never uncharged but the two states are distinguished by a difference in the charged states rather than an on or off scenario.)
It has two states and therefore can potentially information representing one of the two states at any point in time.
So lets imagine an image file derived from a sensor that has a bit depth of 1-bit, Each sensel (sensor element) is a circuit that can contain (in digital terms) either a 0 or a 1.
Lets say that we have decided that 0 represents black and 1 represents white.
That image can only have two tones: white or black.
Now lets up the ante a bit (pardon the pun) and design a 2-bit sensor. Now each sensel has two circuits and each of them can represent two states.
The image can now, potentially have four tones, and so more information is visible in the image.
Not much ( we still only have black and white, and a dark gray and a light gray), but it is better.
And every bit we add doubles the number of tones each pixel could potentially represent.
An 8-bit image can have 256 tonal levels and a 16-bit image a whopping 65 536 tonal levels.
Why is this important?
Well, if you shot a JPEG image with your Smartphone and the exposure is wrong and you then decide to edit it in Lightroom you only have 256 tonal levels to manipulate. If your are doing tonal edits what you are doing is pushing tones to different levels either lighter or darker. What can happen is that you may end up with no tonal data at certain levels as a result. This can ruin an image that depends on a smooth transition of tones.
If one watches the histogram in Lightroom when making edits on JPEG images one may note the histogram going from an uninterrupted "mountain range" to a "hair comb" appearance with spiky bits of data interrupted by gaps. A histogram that looks like that will often translate to a pretty awful looking image!
It doesn't take too much imagination to see that, if one edits a 16-bit image (in fact most raw images have a 14-bit bit-depth) with 65536 levels of tonal data that there is a lot more data to play with and the difficulties that are so common with 8-bit JPEG are very rare with the bigger bit-depth files.
Lets talk about colourspaces now. In common with bit-depth, when it comes to colourspaces, size counts!
I want you to think about all the colours that are in the colour spectrum. Not in terms of how many colours but rather how intense.
Think of a colourspace as a container with a finite size.
Now depending on how big the container is and what colours you want in it, it is possible to design a colourspace that only contains blue spectrum colour.
That is not perticularly helpful and so most useful colourspaces contain colours that we can recognise as blue, green, red, yellow, cyan, magenta, as well as black and white.
So, if all useful colourspaces contain colours that represent all those hues then what is the problem?
The problem is the size of the container. If the container is small then it may not contain all of the most intense hues.
A bigger colourspace (container) will likely contain all of the colours of the smaller colourspace but more besides. It will contain more intense colours than the smaller colourspace as well as all the less intense colours found in the smaller colourspace.
And the pattern continues with even bigger colourspaces.
sRGB, in terms of the above is the smallest colourspace;
AdobeRGB, is the next biggest; and
ProphotoRGB is the largest colourspace.
(There are other colourspaces but they are not important for this conversation.)
Now lets bring everything back to cameras, photography, Lightroom, printing images, and posting images on the web.
The best way to do this is to compare shooting with a Smartphone compared to a modern DSLR in terms file types, bit depth, and colourspace.
The cameras I shoot with produce a 16-bit file raw file. The camera does not assign a colourspace to a raw file but as soon as I import the file to Lightroom then Lightroom will interpret all the image data in terms of the ProphotoRGB when trying to work what colour something should be. (Lightroom does not actually use ProphotoRGB but a minor variant that is not important to our discussion.)
In this process no data is lost.
A Smartphone, or even a DSLR, that produces a JPEG image file the differences are pretty marked.
An 8-bit file is produced. In percentage terms the number of tonal levels in a JPEG is 0.004% the number of tonal levels potentially present in a 16-bit raw file. Ouch!
Your Smartphone probably only produces a JPEG with the sRGB colourspace assigned. A DSLR will at least give a choice between sRGB and AdobeRGB for a JPEG file.
Lets assume that we both shot roughly the same subject, you with your Smartphone and me with my DSLR shooting raw. If there was a lot of colour in the scene that was beyond what sRGB can represent (this is termed gamut) the camera will map the out of gamut colours to the nearest most appropriate in-gamut colour.
So, even if that JPEG is subsequently opened in Lightroom, which uses ProphotoRGB, Lightroom will correctly interpret the colours in the JPEG and map them appropriately in ProphotoRGB, the colours that were clipped in-camera so that they could be mapped to the sRGB colourspace are gone forever!
Now lets look at the whole photographic process from a bit of a birds-eye perspective.
We have the scene to be shot, we capture the scene in-camera and produce an image file, we download this image file and then edit it in Lightroom or some other image editor, we produce prints or derivative files for various purposes.
With each transition described above there is a loss of data. It is inevitable and it is a recognized necessary consequence of the process.
However the differences between a raw-based workflow and a JPEG-based workflow are huge!
In a JPEG-based workflow almost all the data is thrown away with the very first step - the creation of the JPEG by the camera!
Now, if one is planning to use that image as shot, with no editing - just like most press photographers do - then you are fine as long as you got the exposure and white balance right in-camera.
But if you need to do extensive tonal and colour editing then you have a problem.
There is also data loss with a raw-based workflow but it can be minimized and managed because of the huge amount of data that is contained in a raw image file compared to a JPEG.
I think there are one or two Smartphones that can actually produce a raw file, but when one also adds in the differences in sensor size between Smartphones and DSLR's as well as the optics it explains why most people who are serious about their photography will choose to shoot with a DSLR and use a raw-based workflow rather than a JPEG-based workflow irrespective of the device used to get the shot.
I have not mentioned TIFF files yet, but now that you know a bit about bit-depth and colourspaces you will realize that the TIFF format is actually a pretty versatile file format. Unlike a JPEG, where every time one opens and then saves a JPEG file - due to its decompression/compression algorithm, data is lost, a TIFF is an example of a non-lossy file fomat, and, in Lightroom anyway, can be created as an 8-bit or a 16-bit file and be assigned any of the three colourspaces we have discussed. Depending on what is needed one can create a TIFF file that is seasoned to taste!
In summary, I will say this - I know a fair bit about the stuff I have shared here but the information above is neither encyclopedic nor particularly technical.
If you really want to get into photography then you are going to need to acquire a good working knowledge of all of these topics.
If you struggle finding good formal resources we can help.
Tony Jay