When an OS reboots or shuts down, it sends all processes SIGTERM before sending SIGKILL. This allows btcd to do a proper shutdown which most importantly closes the database.