On the origin of the variation of the binding energy shifts of core levels between surface and bulk atoms in transition metals