It's easy to understand why we tend to avoid certain situations, activities, people, or tasks that stress us out, make us uncomfortable, or otherwise generate negative emotions. Nobody wants to feel bad, especially if there is some way to avoid it. Thus, if there is a particular situation that creates anxiety we will most likely avoid that situation whenever possible. It makes sense. There's no reason to deliberately cause ourselves suffering.
Similarly, we are sometimes faced with problems that create distress whenever we think about them. To avoid distress we simply avoid thinking about the problem. Of course we are typically unable to do this indefinitely, but we can always put things off until the last possible moment.
Avoiding things that cause us discomfort can be an effective strategy. If there is a certain person who always manages to get under our skin it is best to deal with said person as little as possible. If we are under a lot of stress and feeling overwhelmed, waiting until later to deal with certain problems could be the best way to preserve our emotional and psychological well being. We have to prioritize. If certain places make us uncomfortable and we don't have to go there then avoiding these places is completely logical. If talking about certain topics upsets us and there is no compelling reason to do so then it makes perfect sense to avoid conversations about said topics. If there are certain memories that are unpleasant to recall it can be beneficial not to recall them.
There are also times when avoidance is a very ineffective strategy. A coping mechanism is ineffective when it creates more problems than it solves. Avoidance has the potential to become this kind of strategy. Because avoidance is so effective at alleviating distress we can inadvertantly begin to rely too heavily on it as a coping mechanism. Anything that alleviates distress is inherently reinforcing. We feel distress, we avoid, the distress is gone. We feel better. We avoid more.
So when is avoidance detrimental? What follows are a few examples. This list is by no means exhaustive.
*When avoiding discomfort or distress becomes the primary factor you consider when deciding whether or not to do something. (Avoiding distress becomes your primary motivation; everything else takes a back seat).
*When the list of things you won't do because they cause distress grows so long that the list of things you will do is actually shorter. (The end result is that you spend most of your time at home and only leave when there's something you absolutely have to do).
*When you put off dealing with a problem or conflict for so long that you end up simply not dealing with it at all. (The problem doesn't go away, of course. It probably gets worse while you are busy not dealing with it).
*When you avoid doing things you need to do or dealing with things you need to deal with, despite significant negative consequences for doing so.
*When avoiding starts to cause conflict in significant interpersonal relationships.