Metals of higher reactivity when attached to other metals corrode more quickly than they would normally as they 'sacrifice themselves' This leaves the other metal free from corrosion. The flipside is also true when attaching a metal of lower reactivity. Now it is the other metal that corrodes faster.