In what is presumably the "good ending" of the Unlimited Blade Works route, Saber stays after the Grail is destroyed, because Rin has turned her into a familiar. (I also got the sense that Shiro was supposed to aid Rin in supplying prana to Saber by having sex with her.)
However, everything up to the end is identical to the path taken in the true ending, except for the fact that Shiro spends more time bonding with Saber (and less with Rin) in the path to this ending. If so, why does Saber remain in one ending and not the other, given that:
Everything Rin did up to the end should have been identical in either outcome in UBW
Saber should have disappeared (as stated before the final battle) with the destruction of the Grail. However, whether or not this statement about Saber is entirely correct may be slightly debatable, per content from the rest of the Fate series.
In the true end of Heaven's Feel, Rider remains after the destruction of the Greater Grail, because Sakura still has a lot of prana on account of her being a copy of the Holy Grail vessel. In Fate/Zero, we see Gilgamesh pull Kotomine out of the rubble, and in the Fate route, we learn that he has stayed around for the last ten years, partly by obtaining energy from the orphans of the fire.
Did Rin just pull more strings to try to keep Saber, or did Saber have more reason to try to stay because of her connection to Shiro?