You do know that I was talking about not running into walls, right?
They could've programmed the AI to detect when the player's entering a doorway, or for all doorways to have a listener that would make the follower know that it has to go through there and in which direction, and then script the entering/exiting doorway so that the NPC ALWAYS use the doorway properly and not get stuck, or try to run into a wall thinking that it's not there, etc.
Another lazy/easy way is to mark waypoints for the NPC to follow the player properly.
Hell, even if teleportation were done, it'd make more sense to teleport the NPCs BEHIND the player instead of IN FRONT of the player, when the NPC was clearly left BEHIND.