Without a dielectric union, your water heater is gonna look like an exploded battery! Why does that happen? As most of you plumbers already know, when you put two metals that are not the same together with water (an electrolyte) running through them it creates something called electrolytic reaction causing galvanic corrosion. That's the crusty white stuff or crumbling rust you see on the outsides of old water heaters. This combination essentially makes the hot water heater into a battery because there are small amounts of electricity running through the metals as the water passes through. When you use a dielectric union that is usually made of plastic or rubber it stops those metals from touching so there isn’t contact for the electrical charge to run through. Nowadays a lot of water heaters are starting to come with a dielectric nipple as part of the attachment because a lot of places have now made it part of the building code.
For more on dielectric unions check out the links below: