Return type at the ending of the program

why did we return -1 in the last? what does it mean? what is it helping in??