A backflow prevention device is a mechanical device with check valves, air inlets, and/or relief valves installed on water piping. Its primary function is to stop the backward flow of water inside the piping system. By law, backflow prevention devices are required to be tested at least annually by a certified tester to verify they are working properly and must be repaired when they fail the minimum testing requirements. The local water purveyor in your area and/or the Health Department will decide where and when a backflow prevention device is required.
The local water purveyor (water department) in your area is responsible for delivering water that meets minimum federal standards. The water in their pipeline has been treated & tested to verify they are delivering clean, safe drinking water. The water department has complete control over their system of piping; however, once the water goes through the meter and into an office, commercial, or industrial building (or any other facility) they no longer have control over the water. In order to prevent the backflow from polluted or contaminated water into their piping, the easiest solution is to install a backflow prevention device. These devices can be installed on irrigation piping, potable water piping, fire protection piping, or industrial water piping. They can be installed on boilers, cooling towers, kitchen equipment, or any other system that uses water and has the possibility of polluting or contaminating that water.
Historically, backflow into water lines has contaminated city water supplies and interior piping inside buildings, causing serious illness (which in some cases has resulted in death) from waterborne diseases. Backflow prevention can be accomplished in a variety of ways, with approved backflow devices being just one method. You can see backflow prevention all around you (probably without even recognizing it). The air gap between your faucet and sink is a type of backflow prevention as it prevents any standing water in the sink from being siphoned back up through the faucet. The same principle applies to your toilet, stopping the sewer water from getting into the potable water (drinking water) piping. Your dishwasher has the same air gap principle too. The plumbing code mandates all these types of safeguards to protect the potable water.
The intent of the backflow prevention device is to work 24/7 to protect the health of the public by protecting the water supply against a backflow condition.