killing 0 isnt killing the pid 0. Instead it is an option in kill to kill all processes in the current group. With your command you are killing everything in the process group ID (GID) of the shell that issued the kill command.
from the kill man page:
pid... Specify the list of processes that kill should signal. Each pid
can be one of five things:
0 All processes in the current process group are signaled.