Every mental state exists for a purpose; to understand it, we must ask what function it serves in the broader system of behavior.