What caused the difference between the good and true endings of Unlimited Blade Works? In what is presumably the &quot;good ending&quot; 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?
In the visual novel nothing is told. 
The anime clarifies quite a bit:

True ending: Rin stares as saber disappears (no running from Rin). After a while Saber starts her speech: Basically congratulations, I would have really liked to stay but Shiro has you (it is sooo clear she can be easily convinced, but Rin didn't do anything). In this ending it is also clear Rin is head over heels for Shirou and realises he doesn't care that much for saber. 

Good ending: Rin runs like berserker to save saber (it's just a few meters though). Now the big question, Why did Rin saver her? There are 2 possibilities:

A) She doesn't love Shiro that much since she didn't receive enough points. I would find it hard to believe though because of how much she insists afterwards he's hers and that saber and her will teach him magic and martial arts on a daily basis. Also, why get so angry then when she considers they're flirting? 
And why would Rin also say: You want her to stay, so it's alright (this is said in the VN). 
Another reason I don't think it's likely is because in the whole VN Rin always gives Shirou what he wants: Fate (she helps bringing saber and Shirou together); UBW (if you just want Rin, you get just Rin. If you're also interested in saber Rin runs to save her); HF (she wants him to be with Sakura and be happy).
You could argue it is because Rin doesn't love him a lot, but 90% of the time she's risking her life because of him (and dies a few times due to that in the bad endings). Sakura can't do that even if she wants to and saber does it out of her contract (at least during the first part of each route). I've always imagined Rin as Shirou's guardian angel, and the only reason they turn into a couple in UBW is because he realises that even before the war started she saved him by consuming her most powerful weapon.

B) She knows in this ending Shirou would almost die of sorrow if saber goes (not so much as the fate route but not that far away either). Well, this is what I believe happens. The reason why Rin keeps insisting saber is her familiar and hers would therefore be because:


She doesn't want them to get romantically attached (in the VN she tells them not to flirt), she just wants saber to watch over him (so he doesn't become archer) and support him and make him happy.
Imagine Rin gives saber back. Well, this would be a threesome whether they want it or not. Rin not having a link with saber = having sex with her, the same goes for Shirou. Now, with the link Shirou and Rin can become a couple and mana be supplied constantly without sex.