Rust particles, sand, and dirt can develop inside the gas piping. They can break off and travel with the gas to your water heater. A sediment trap collects the sediments preventing them from damaging your water heater.