It is expected that any process will return an integer to the operating system, to indicate its completion status. The normal convention is that a return value of 0 indicates success, and a non-zero value indicates some kind of error or unusual status. An application isn't forced to use that convention, and can use that number for other purposes, although it can be annoying for people using it if it doesn't follow the convention (e.g. Robocopy, which uses a completely different convention).
If the program is used within something like a batch/script file, then the returned value can be checked and different action taken depending upon its value.