why do metals tend to lose electrons to form positive ions?