I would refer you to the article about the causes of bpd, because that is essentially what you are asking about, I think.
In a previous study, Trull and research colleagues examined data from 5,496 twins in the Netherlands, Belgium and Australia to assess the extent of genetic influence on the manifestation of BPD features. The research team found that 42 percent of variation in BPD features was attributable to genetic influences and 58 percent was attributable to environmental influences, and this was consistent across the three countries. In addition, Trull and colleagues found that there was no significant difference in heritability rates between men and women, and that young adults displayed more BPD features then older adults.
Currently, the most generally accepted theory is that bpd results from a combination of genetic predisposition plus being raised in an invalidating environment. I am warming up to that theory, myself, because that particular wording allows for the possibility that in the case of the hyper-sensitive and cognitively-impaired individual, their environment is perceived
as invalidating by that individual even though their environment is objectively normal or average.
At the same time, it is true that infants and children naturally pattern their behaviors on their primary caregiver's behaviors through every-day exposure, the same way they pick up the language used in their family. So if children are subjected on a daily basis to frightening, abusive, unpredictable behaviors or to rejecting and negligent behaviors on the part of their mother or primary caregiver, that becomes familiar, everyday life and the child's "normal". Picking up and mimicking bpd behaviors is called acquiring "fleas."
However, if the older child has the ability to take personal responsibility for his or her behaviors and not always blame others for causing problems, if the child cares that his or her negative behaviors hurt other people and wants to improve his or her negative, counter-productive behaviors, then the child very likely does not have bpd and can learn to modify and improve unwanted behaviors with therapy. In my opinion, in addition to therapy, the less exposure the child has to the mentally ill primary caregiver, the better.