Because they both send different signals to the process.
From the Linux man page:
The command kill sends the specified signal to the specified
processes or process groups.
If no signal is specified, the TERM signal is sent. The default
action for this signal is to terminate the process. This signal
should be used in preference to the KILL signal (number 9), since
a process may install a handler for the TERM signal in order to
perform clean-up steps before terminating in an orderly fashion.
If a process does not terminate after a TERM signal has been
sent, then the KILL signal may be used; be aware that the latter
signal cannot be caught, and so does not give the target process
the opportunity to perform any clean-up before terminating.
kill -9
generates
SIGKILL(9)
which, unlike SIGTERM(15)
, can not be blocked, caught, or ignored by a process.
Why? Because it is designed to be so. It is equivalent to saying:
“Away, you starvelling, you elf-skin, you dried neat’s-tongue,
bull’s-pizzle, you stock-fish!”
to a process.