The default "illegal" callback calls abort, which will crash the JVM or native app. We check arguments before calling secp256k1 so it should never happen, except when trying to create a partial musig2 signature with an secret nonce that does not match the private key. Methods that could be used to verify that the secret nonce does match the private key are not exported, hence the choice to set a custom callback.