Accretion
We are an accumulation of our past experiences and emotions. Vicariously or in reality, the way we feel about a situation is ultimately based on how we've seen ourselves reacting in a given situation based upon who's watching us when a reaction is required. For example, if you're writing a paper, you'd write a better paper if you strive to be accepted and or praised by a teacher you're fond of. Barring a driving need to get straight A's, you'll write the best paper for a teacher you hope to impress. We watch zombie flicks and imagine ourselves kicking ass, leading, being the brave, the best, the survivor. We play video games and know, we know that we'd totally have the guts to take on a village full of bad guys.
This is a distraction, we're human, malleable, biological, imperfect. In any given situation we will act on a simple equation. Our past experiences + our willpower - our selfishness.