The purpose of the pilot assembly is to provide a spark and ignite the gas that fuels the water heater.