Exit code
The number a program hands back when it ends; 0 means success.
Think of it as A receipt that says whether the job worked.
Anything other than 0 means something went wrong, and the exact number is the program's choice. You read it with echo $? on macOS or $? and $LASTEXITCODE in PowerShell. CI checks pass or fail by it.
Where the picture breaks
A real clerk asks 'are you sure?' and keeps returns, but the terminal does exactly what you typed: deletions skip the Recycle Bin and there is no undo.
A shell reads a line, finds the program by name in PATH, runs it with the arguments in the current directory, and reports its exit status. It never asks for confirmation unless the program does.
See it with the rest of the analogy cast