Because in UNIX/POSIX, the exit code of a program is defined to be an unsigned 8-bit value. Converting -1 to unsigned 8-bit gives 255.
Edit to add:
To give more detail: the wait*() family of system calls in UNIX encode the result of a process into a single 32bit integer. The 32 bits of that result are further broken up to provide information such as whether the process dumped core, exited due to a signal (and which one), etc. Of that 32 bits, only 8 are reserved for the exit code of the process and those are interpreted as an unsigned value.
The fork/exec/wait model of UNIX/POSIX is one of its very oldest and most deeply embedded features; if you were designing a new operating system today you might do something different (at least use 64 bits :-)).
On the other hand, practically speaking is it really useful to have >255 exit codes? I doubt it. If you really wanted something more powerful I'd suggest that you'd switch to an "exit string", instead of a numeric exit code with a wider range.