Phobias are irrational, yet the brain surprisingly has a good reason for creating them.