The Evolutionary Purpose of the Ego