I think you're conflating a couple of different concepts here. The standard practice is this. When a program returns a value to the operating system upon completion or termination, it will return a 0 to indicate successful or normal completion. When a program returns a non-zero, it usually means that the program itself detected an error condition, such as bad input data, and the number gives an indication of what happened. But understand that, in either case, it's still a normal termination of the program. This is not an outright crash, which would be handled by the OS itself.
Now, in a function, a return statement with a return value is returning a calculated value back to the calling function or main. This has nothing to do with indicating a crash or adverse condition. In the function you gave as an example, the function is calculating one of two values, depending on the input value, n, that was passed to the function. In fact, this is a recursive function that calls itself until n=1. (It's a factorial function.)
If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)