I understand that anxiety is a survival mechanism that protected us from danger so that we may pass on our genes etc.

The thing I don't get though is how anxiety ends up backfiring on it's self and while people may be surviving they aren't thriving in any way because of it. Anxiety can and does actively push people away from the very things that would make their survival and likelihood of passing on their genes more likely.

It makes no sense that anxiety would drive you away from the solution and into a place that only perpetuates more feelings of anxiety. It's like choosing to run around in circles around a lion trying to eat you instead of running into the safety of the cave with other people to protect you.

Can anyone explain why anxiety is like this?