It is a conditioned response to severe anxiety. One could redefine Agoraphobia as being an all-consuming, irrational fear to what is no longer familiar. The fear of venturing beyond one's home, the fear of driving over bridges or driving on the open highway. There is no mind without a brain, and the brain, like the stomach or heart or any other organ, is subject to the same physical biological constraints. When something goes wrong with the brain's complex chemistry, symptoms will occur.
Agoraphobia tends to self perpetuate just like any other conditioning process.
The victim becomes conditioned by the fear they so vividly experience and develops, at first, a welcomed avoidance behaviour. Before you know it the victim starts avoiding malls, etc. We have in our brain, a group of cells that serve us as an alarm system. Imagine for a minute you just came out of the barbershop and on your way to your car you come face to face with a huge, ferocious looking tiger. You run faster than you can say abracadabra.