There could be many reasons for this. For one it could be because they are attracted to them and they don't think that they could ever feel that way with someone else, thus they are afraid of leaving them. Another reason could be because they are insecure about themselves and believe that no one would like them as much as this person, hence he/she fears that if he/she leaves the relationship, he/she will never find someone again. Another one may include that there is some sort of thing that binds them together like a child; they don't want to be separated because they have a child in mind. Possibly, if this person has some sort of mental problems, he/she is still in the relationship because he/she likes to inflict pain on themselves and/or create drama. These are just a few common examples and I'm sure there are plenty more.