That's a really good thought process.
The fluffy answer to my inquiry is something like, the basics of cognition evolved for specific adaptive purposes but then expanded, interacted, or generalized in ways that changed their functionality and usefulness. At some point those purposes likely became dis-attached from the adaptive intention.
This is something like what Dennett would call a "crane" in his aforementioned book. Though it's unlikely that some external force "pulled" human cognition out of the supposed darkness into what we experience now (such a miracle he would deem a "skyhook"), it does seem to be the case that a new layer of cognitive complexity was enabled(!) by the interaction of fundamentally simple, understandable parts. It's a gap that's really hard to wrap your mind around, for me anyway.
Dennett and Dawkins tried to use memes to do it. Memes essentially became units of selection that operated in symbolic space rather than natural space. But the circularity of the theory caused it to disintegrate pretty much as soon as it took off.
I like your recursive loop idea and depression analogy. I'll have to think more about those.