They have to make us emotionally attached to the character(s) in order for us to get a emotional response like that. I don't think I've ever cried at a games ending though, a playable narrative is hard to 'cry' to when you've just potentially gone through a highly intense battle in the final boss (and depending on how well you did, maybe on your 4th or 5th attempt).
Hmm, pie.