This is not rocket science. But it is science! (Retired science teacher here!

) The angle of reflection equals the angle of incident, That is the light rays leave a surface at the same angle they hit the surface. On a perfectly flat surface that results in a "specular" mirror like reflection. A rough surface presents many different angles to the incoming light rays which results in the reflected rays leaving in all different directions causing a diffuse reflection or hazy to flat finish.
So the whole goal of color sanding and rubbing out is to produce a perfectly flat paint surface. 1000 grit wet sanding removes all roughness except the scratches caused by the 1000 sand paper which is still rough enough to produce a diffuse reflection. 2000 grit wet sanding removes all the 1000 grit scratches leaving only the smaller scratches from the 2000 grit which are small enough to start to look a little shiny. IF you want you can go to 3000 grit paper which doesn't even feel like sand paper and starts to produce a sheen. BTW Yes there is 4000 and 5000 grit sandpaper! I ordered some on Amazon to experiment with when I get to the top sides of my fenders!
Usually after 3000 grit we move to a "cutting" compound to remove the 3000 grit scratches, and then to a "polishing" compound to remove the scratches left behind by the cutting compound. Finally a wax or sealant is applied to protect the finish you worked so hard to obtain. IMPORTANT Wax doesn't produce a shiny finish, but only protects one that has already been obtained. BTW the "Chemical Guys" produce a whole series of finer and finer compounds for this compounding process, but most get by just fine with a two step compounding process.
The only big problem occurs when you run out of paint thickness before you run out of scratches. This is the reason many prefer the base coat/clear coat system. All the sanding/compounding is done on the clear coat leaving the color coat untouched.
How do you know when your done? Take an issue of Hemmings and hold it 8-10 feet from the car. If you can clearly read the "Hemmings" backwards in the reflection congratulations you are there!
Sorry to be so long winded, but once you get the teacher in me going . . . Well, that's what I did for 35 years!