The EXIT then number sets the errorlevel code to the given value. This value can then be checked by another script or process and further action taken depending on the result.

ie..

2=The system cannot find the file specified
5=Access is denied
20=The system cannot find the device specified

There has also been discussion on the board that relates to code that needs to have an EXIT some number otherwise it might not end properly. Not all code requires this to end the script though.