Illegal immigrants coming and "taking" jobs has been a thing for a very long time as well as drug smuggling and other reasons to illegally cross a border is a political issue and the episode is a political parody of sorts.
One explanation is that the cartoon gave trump ideas.
A more serious answer is the US government has maintained a wall of sorts across ...
His not wearing pants is based on Magnus: Robot Fighter, but Zapp himself is based on James T. Kirk. However, the creators say he is based more on the actor, William Shatner, than on Kirk. Either way, that guy has swag!