false; echo $?
The above will output 1, which is contradictory with all other programming languages I know.
Any reason in this
it's a convention dated back to the early days of Unix.
By convention, all system calls return 0 if succeed, non-zero otherwise, because then different numbers can be used to indicate different reason of failure.
Shells follow this convention, 0 means last command succeeded, non-zero otherwise. Similarly, the non-zero return value comes in handy for output error messages: e.g. 1: "brain dead", 2: "heartless", and so on.