I'm going to try to merge some ideas here.
[MENTION=2518]Derren[/MENTION] seems to prefer letting the existing mechanics decide and to encourage players to prepare for retreat (buy gear/spells) than to just let them run away if they want.
[MENTION=463]S'mon[/MENTION] and [MENTION=99817]chaochou[/MENTION] have some ideas about making it a skill check/challenge.
For the skill check method, I would not want it to bypass or outshine planned/prepared retreat tactics by letting players say "oh crap, we weren
t prepared for this, we run away" and have it be better than the party that actually spent resources to be prepared for a retreat.
Conversely, by the raw, the rules don't give a perception of a reasonable chance for an unplanned retreat.
I think the reasoning for why a retreat may work beyond mere mechanical differences is psychological. Sometimes the enemy is wary of a trap, why would a weaker force attack unless they were stupid or hoping to provoke a pursuit into a trap.
I think a morale check or the skill check idea can account for this. Do a roll, add some modifiers for the mindset of the enemy or preparations the PCs made. Whatever.
If it suceeds, the party got away for any number of reasons, including the monsters just weren't hungry that day. If fails, the monsters were hot for bloody, hungry, etc.
If you want to use the existing movement mechanics, use this check as a morale/decision maker on whether THESE monsters are the kind that fight to the death, or these are the kind that aren't as motivated to run after the party forever.
If you're a DM who just decides what the monsters do based on whatever thing inside your head thinks make sense, that's fine too.
Just don't be a DM who runs every monster the same that never retreats, fights to the death, and never relents in its pursuit of the PCs.