Fleance escapes because the witches pronounce that Banquo’s sons will be king.
Aside from the purposes of historical accuracy, Fleance needs to escape so that all three of the witches' original predictions can come true. In order for Banquo’s sons to be king, then he has to have an heir to escape.
When Macbeth and Banquo first meet the witches, they make three predictions about Macbeth. The first two pertain directly to him: he will be Thane of Cawdor, and he will be king. The third one though, is troubling to Macbeth. The witches tell him that it is Banquo’s heirs, and not his, that will inherit the kingdom.
Banquo does not take the prophecies seriously, and is disturbed by the whole event. Macbeth asks Banquo what he thinks of the pronouncement that his sons and not Macbeth’s will be king.
[Aside] Glamis, and thane of Cawdor!
The greatest is behind. ...
Do you not hope your children shall be kings,
When those that gave the thane of Cawdor to me
Promised no less to them? (Act 1, Scene 3)
Banquo explains to Macbeth that he does not think the witches are trustworthy, reminding him that “oftentimes, to win us to our harm,/The instruments of darkness tell us truths,/Win us with honest trifles, to betray's/In deepest consequence.” Banquo is concerned about Macbeth’s reaction to the entire situation, from the witches to the prophecies. He is trying to convince Macbeth to ignore them, because he is worried about where it will lead.
He is right to worry. When Macbeth is made king and Duncan is dead, Banquo knows the score. He says in a soliloquy that Macbeth has everything he was promised, but he worried that he “play'dst most foully for't” (Act 3, Scene 1). He is already suspicious. It is because of this that Macbeth decides Banquo has to die, and Fleance as well (so that no heirs of Banquo can be king). Macbeth gives orders to his murderers to kill them both. Time is of the essence.
[It] must be done to-night,
And something from the palace; always thought
That I require a clearness: and with him--
To leave no rubs nor botches in the work--
Fleance his son, that keeps him company,
Whose absence is no less material to me
Than is his father's, must embrace the fate
Of that dark hour. (Act 3, Scene 1)
Banquo is killed. Fleance escapes, however, with his father telling him to run (so that he can later avenge his father’s death). Banquo is less concerned with Fleance or his heirs being king than making sure his son escapes.
Malcolm is the king, of course, so how does Fleance become king? That much is not clear, but it seems that somehow, Fleance became heir to the throne. The witches prophesized a long line of Banquo’s heirs as king, showing Macbeth “A show of Eight Kings, the last with a glass in his hand; GHOST OF BANQUO following” (Act 4, Scene 1). For this to come true, somewhere in the line Banquo’s heirs must become king.
Macbeth thinks that he has it all figured out when he decides to kill Banquo. After all, it is like killing two birds with one stone. Banquo is suspicious of him, and his sons are supposed to be heirs to the throne. By killing Banquo, Macbeth can ensure his safety and the safety of his heirs in the kingship. However, in order for this plan to work, Fleance must die too. When he doesn’t, it is the first real blow to Macbeth. His days are becoming numbered.