It's because the the two metals have different work functions.
Current flows to ballance the voltage difference at the surface.
The main key word is "surface work function", there is a vast
literature on the subject.
Patience, persistence, truth,
Dr. mike