The exit code of a program basically says if it succeeded. 0 usually means success, and another number means faliure.
This is very useful in command-line applications. The bash shell uses it to enable you to do stuff like this:
# run command2 only of command1 is successful
command1 && command2
# run command2 only if command1 failed
command1 || command2
# run command2 and command3 over and over while command1 succeeds