Emotions evolved because they compress complex survival information into rapid, embodied responses: fear makes you flee danger without conscious deliberation, and social emotions bind groups together for cooperative advantage. This emotional processing became particularly sophisticated in mammals with REM sleep and dreaming, allowing brains to consolidate emotionally-charged memories and rehearse threats safely, giving species with richer emotional lives a competitive edge in complex social and unpredictable environments.