It is my understanding that the mind is programed to avoid situations that are uncomfortable. This programming started when you were born and has been continuously edited ever since. As you get older less and less editing is done unless you actively seek to edit this programing through meditation or psychotherapy (for example). This programing exists as a survival tool. The less discomfort you experience, the more likely you will be to survive and reproduce. Our physical bodies are here because our progenitors possessed this programming. In that sense it is a good thing and should not be judged to harshly.
Some (probably most) of this programming was brought about through childhood trauma. This programming may be useful on a macro level (i.e., it increases the likelihood that you will continue to live long enough to reproduce), but on a micro level manifests itself in dysfunctional ways. For example, if a child is shamed he will seek to avoid situations where will be shamed in the future. This protects him from shaming but prevents him from fully living his life.