It’s like how you can define a phrase like this:
To decide whether (X - a thing) is very far north of (Y - a thing):
which would allow you to test things like “If the rock is very far north of the tree.” But the direction north isn’t actually an argument to this “to decide whether” phrase; it’s just something whose name happens to show up in the phrase you can call it. So you couldn’t test “if the rock is very far the way of the three” (even if the way is north) because Inform can only evaluate that phrase with the literal word “north” in it.
The “mapped north of” phrase is like that, except that there’s a different phrase (in fact these are verbs) for every direction. Almost – in fact the verbs for up and down are “to be mapped above” and “to be mapped below” rather than “to be mapped up of” and “to be mapped down of.” If you create new directions then the compiler automatically creates new relations and verbs somehow, but you still can’t use directions as variables in this phrase.
As Dannii says, the phrase “change (direction) exit of (room) to (room)” is designed so you can use variable directions, so you can use that.
ETA: I looked through some random dungeon generation code I have and it says, about the change direction phrase, “(I forgot about this formulation and it nearly drove me to distraction.)” As that comment says, you might want to look at section 8.5 of Writing with Inform.