The GIL ensures Python's reference count updates are atomic, preventing race conditions that could corrupt memory or lead to leaks, a core reason for its initial implementation.
Open the full topic