Concerning Shakespeare's Macbeth, Malcolm and Donalbain flee after their father's assassination because they fear for their lives. As Donalbain tells his brother: "Where we are / There's daggers in men's smiles" (Act 2.3.140-41). Whoever killed their father is still in the castle, and they are obviously targets: "The near in blood, / The nearer bloody," concludes Donalbain. In other words, the closer their relationship with Duncan, the more likely they are to be murdered, and just because the thanes act sad that Duncan is dead and act like they are loyal to the brothers, any one of them could be lying and pretending.
Remember that Malcolm has just recently been designated as Duncan's heir by Duncan, and also that Duncan warned Malcolm that you cannot tell what a person is thinking by looking at his/er face. The brothers are prime targets, and they know it. Thus, they flee.
This, unfortunately, casts suspicion on them, and makes it less likely that anyone would assume Macbeth is guilty. Other characters assume that the brothers assassinated their father, and that they flee in order to escape prosecution, all but Macduff, anyway.
Ironically, Macbeth might have gotten away with the assassination, except that he varies from his wife's plan and kills Duncan's grooms. This makes Macduff suspicious, and leads to rebellion.