That is an excellent question, and one I would pose to those studying the field of psychology - I know we have at least one on this board I heard from before.
In my "opinion" (from observation), I believe being co-dependent has more to do with someone's need to control and feel "needed" by the other person, while mistaking that reliance on them in return for real love vs. simply serving a purpose. I "think" that codependents have a false sense that they can't survive without the other person and feel completely lost without them...thinking it is real LOVE, but unconsiously it's the fear of being alone, no longer in control and not needed anymore. It's almost like they are addicted to the person and their role in the relationship.
Staying in a relationship with an abusive, drug/sex addict, cheater, emotional abuser, irresponsible person, or worse yet a sociopath, who because of their faults are either unwilling or unable to give you the love, respect, and care you deserve is very different than having a "real" loving relationship with someone who is in a car accident, gained weight, or becomes disabled from an accident who is still giving you the love, respect, and care in return.
In order to truly love someone you must love yourself FIRST, and therefore, I think MAYBE that is where any problem would lie. My best friend, whom I helped talk into going to counseling for this, didn't really care to have any needs met, she was always giving, giving, giving, for not much in return -- and never asked herself WHY do I truly love this person? When I asked, her reply was always: "I don't know, I just do, no one understands!" After counseling, and much support from family and friends, she learned that it was a result of her low self-esteem and depression (which I never saw her with). Anyhow, once she worked on herself, she was able to move on with her life, and now describes her new relationship as healthy and finally being a true partner vs. solely being the rock to lean on. She is a much happier person all around!
I think if anyone has trouble ending or moving on from a relationship that they know isn't good for them that they should seek guidance/counseling to help determine why. Too many people feel ashamed for some reason, but I say if the help is there - Take it - don't waste precious time being unhappy. (sorry this was so long!!)