Dielectric unions are used to separate two dissimilar metal pipes (such as copper pipes and galvanized steel). Purpose of dielectric unions is to prevent galvanic corrosion, which is caused by electrolysis.
Electrolytic corrosion occurs in plumbing systems that contain dissimilar metals. The process of corrosion is rapid when the water is present in the system, since it acts as a medium between the two metals. The three components: water and two metals, form a "battery", where electric current carries ions from one metal to another, causing it to dissolve. The washer inside the union prevents such current from flowing, thus preventing corrosion itself.