Immigration comprises three issues at the heart of republican (small "r") government: (i) defending the country; (ii) enforcing the law; and (iii) respecting the rights and duties of citizens.
A fence, whether electrified, moated or alligatored, will not work unless defended. So, many politicians who talk tough about a fence make no sense unless they also deal with what else must be done to secure the border.