The answer to 'what causes drain trap' is a drain trap is a U-shaped pipe under a sink or other fixture that holds a small amount of water to prevent sewer gases from entering the home. The water in the trap creates a physical barrier that blocks odors and pests from coming up through the drain.
Drain traps can become clogged or dried out over time, which allows sewer gases to escape into the home. Common causes of drain trap issues include hair, soap scum, and other debris building up in the trap, or the water in the trap evaporating due to lack of use. Keeping drain traps clean and ensuring there is always water in them is important for maintaining good indoor air quality.