We didn't put someone's needs before or own because we are saintly, its part of a bigger picture of how we deal with relationships -- there was a perceived benefit and motivation for doing it -- we choose it -- over and over.
The question we each must ask is why - what was the payoff that drove us to do this? This is the cause. The former is only a symptom.
Speaking from my own experience, I had a (bad) habit of putting (some) other people's needs before my own. What I *thought* was my motivation was that I was a "nice" guy. Specifically I was this way towards a specific subset of the people I met; there were some people I was more inclined to be "nice" towards.
I did think I was a "saint." I did think I was doing the "right" thing. What took me some time to realize was that my choice of who I was "nice" to, or open to, were people who seemed familiar to me. And coming from a family of origin (FoO) where some family members exhibited personality disorders, what was/is familiar to me, isn't all that great to be around.
What was my payoff? My payoff was being able to reconstruct an interpersonal relationship that resembled my disordered familial relationship, probably in an effort to "solve" the internal issues I felt about these dysfunctional relationships. So I would pursue women who were similar to my mother in order to "win over" the maternal love and validation I'd always sought but never received. Or I would befriend those who were similarly narcissistic as my father, in an effort to "win over" the approval that my own father could never give.
My problem was that I was selecting these people too well. I kept picking borderlines and narcissists; probably because those were the specific dynamics to which I was familiar. It was easier to come to terms with this with friendships, I was able to be more objective and I was less attached; eventually I started to select friends who treated me the way I wanted to be treated, and not only based on how I *felt* about them. When it came to courtship, this was harder to come to terms with. To this day I operate for granted, that if I am attracted to someone for no obvious reasons, or for some reason I cannot specify, then chances are they are personality disordered in some way with which I am sensitized towards; not everyone person towards whom I feel attracted, but one specific kind of attraction which others might qualify as "good chemistry." For me, chemistry = chemisery. And in those relationships, that was the specific payoff, the "falling head over heels in love" feeling. For a die hard romantic, this is not an easy thing to give up.
Understanding the cause and dealing with it is all important to growth.
This is not about blame or defectiveness - its about understanding our inclinations that are not serving us well so that we can be mindful of them, compensate for them.
I remember carrying a lot of judgement for a long time. Enough that I projected it outside myself all the time. I would equate miscellaneous looks from complete strangers as gazes of criticism or judgement. I was worried about appearing to be "correct" or "compliant." I kept thinking I was this way because of other people; in truth, I was this way because of my own internal processes.
I wanted to avoid blame because inside I felt defective. And to be honest, I probably still feel this way to some degree and will always feel this way. But so long as I work towards taking care of myself, seeing to my own needs, doing what ten years ago I would have accused myself of being self-absorbed or self-indulgent; so long as I continue to be my own best advocate, I feel less defective, and I don't care so much about what other people *might* think about me.
My recovery process involves coming to terms with my own co-dependent traits. It might not be the case for other people. It doesn't matter what the specifics are, just as long as you know what you need to work on. Because happiness is not dependent solely on external factors; it is perhaps more dependent on our thinking and relationship with ourselves.