Adsorption of electronegative elements on a metal surface usually leads to an increase in the work function and decrease in the binding energy as the adsorbate coverage rises. Using density-functional theory calculations, we show that Cl adsorbed on a Mg(0001) surface complies with these expectations, but adsorption of {N,O,F} causes a decrease in the work function and an increase in the binding energy. Analyzing the electronic structure, we show that the presence of a highly polarizable electron spill-out in front of Mg(0001) causes this unusual adsorption behavior and is responsible for the appearance of a hitherto unknown net-attractive lateral electrostatic interaction between same charged adsorbates.