The DM might not have planned anything. The point is, if the players didn’t choose to avoid an ogre, encountering an ogre doesn’t invalidate their choice.
Sure, and if they went off the path in order to avoid the ogres on the paths, it would invalidate that choice for them to encounter those ogres anyway. But that’s not something they would be capable of doing, given that they’re not aware of any ogres on the paths at all.
Which would not invalidate their choice to teleport 3000 miles away.
There’s nothing to avoid. They just choose where to go and happen to encounter an ogre there.