By setting cleared pointers to `NULL` after decrementing their reference count, `Py_CLEAR` explicitly prevents dangerous double-free vulnerabilities and use-after-free issues, which can corrupt memory and lead to crashes or arbitrary code execution in C extensions.