I have to believe she may have very low self-esteem. I know people like this that are very successful in school/work and this is where they shine, feel comfortable, etc. It’s whete they can say to the world, “see how good I am!” I don’t in any way mean this in a derogatory way, rather they may have low self-esteem, feel insecure/inadequate in their personal life so they seek out a line of education/work that allows them to feel/appear successful. I think a lot of these people still suffer from “imposter syndrome” and even though they look successful they are still suffering inside that they “still aren’t good enough”.
Along comes a guy (person) that initially makes you feel wonderful and for awhile your life seems to click. But the inside doubts about yourself are always there. Even if the other person IS wonderful, they can’t constantly provide the reassurance/security to your self-esteem. It is exhausting and the relationship will often fail.
But if that other person ISN’T wonderful and the relationship isn’t positive, it only reinforces your own feelings of inadequacy and low self-esteem and you may believe that this is the best you can do and you stay because you (sadly) believe that someone is better than no one and you should just accept it because no one else will ever love you.