not necessarily, and not necessarily always. mostly when our behavior remains unconscious does it bite us in the ass. some defense mechanisms, such as sublimation, are considered positive relative to more destructive alternatives.
an grossly oversimplified example would be a fear of abandonment causing you to preemptively destroy meaningful relationships, ultimately leaving you isolated and alone. if your behavior is unconscious, it may seem to you that everyone is abandoning you, when truly you are driving them away.
another thing about the defense mechanisms are that they take an exorbitant amount of psychic energy to maintain. Ego means "I am", and anything that comes into your life that threatens your sense of "I am" will understandably be defended against, but these defenses are essentially psychic distortions of reality, lies that you tell yourself in order to maintain ego integrity. it takes much less energy to just let reality be.