When See-Through Leaves is switched off, leaves behave as opaque blocks. They also correctly cull each other.
However, in contrast to most opaque blocks, the suffocation overlay does not get displayed when the camera is positioned inside of them. This allows for things occluded by leaves to otherwise be completely visible, which should not happen.
Almost every opaque block in the game will display a texture overlay on top of the camera if the camera is placed inside of them. For some reason, leaves do not do this, permitting this exploit to be performed.
To fix, leaves should display this texture overlay if they are rendering as opaque.
Thank you for helping us improve Minecraft! We saved your files: