There can be many reasons why air has gotten into your hot water pipes. For example, if insulation is damage or missing from the pipes near the water heater, heat will escape and expansion of air will occur as pressure builds. In colder climates, ice may form on outside of the piping and when conditions warm up, the ice melts and water flows through the openings and displaces air.