I think it's true about trying to resolve the problem of the past - and also true about the script. You can realise the stuff about trying to do your parents' marriage, better, and stop that - but still go on to find yourself another abusive relationship because you're still 'in script'.
At least, that's what I did. I know I'm not the only one. I ended my first marriage "to Dad" (violence, insults, etc) but completely failed to notice all the other kinds of abuse in my second one and other relationships.
As tawdry and pickgo said, it's about what your family trained you for. You can't just suddenly adopt a whole different set of values, because you have to get the new ones from somewhere and re-train. Everybody goes around giving out clues as to what their training was. You naturally resonate with other people whose values are similar. Bingo, you got yourself another dysfunctional relationship.
I had two different sets of 'training' - the weird one from my family, and a much more useful one from school. This led to my talking and acting like a highly functional woman (school) but feeling and thinking like a mad one (family). The idiots I shared my adult life with were drawn by my surface polish, but I bonded with them through compatible damage.
That's the main reason I advocate in-depth relationship education at school. While it can't overwrite the lessons of family, I think it can lead a person to make better choices faster.