This is expected behavior, read documentation on returnStatus parameter:
Normally, a script which exits with a nonzero status code will cause the step to fail with an exception. If this option is checked, the return value of the step will instead be the status code.