Hens keep their eggs clean by closing off their intestine while laying them, preventing any contact with feces during the process. This helps ensure that the eggs remain clean and safe for consumption.