Your maladaptive behaviors did at one point do something useful for you -- keep you safe(r), make you temporarily feel better in an untenable situation, meet a need you couldn't find a way to fulfill otherwise. If you find it hard to stop doing them now, even though they hurt you in some way, that probably means they were at some point important and useful tactics, even if they were just the least damaging option in an impossible situation.
So if you struggle with perfectionism, perhaps perfectionism did, in fact, protect you from harm or neglect during childhood, to the degree that anything you did could. As children we have very little agency, but we do learn from the way people treat us. If being "good" meant we got our needs met more often, or it partly shielded us from harm, it makes sense that we'd keep trying to behave that way.
Being mistreated or abused by adults is not a child's fault. Trying to be perfect was not going to save us. But it may have been one of the only tools for survival we could build and use at the time, flawed as it was.
We can recognize that our old tools don't work well or indeed hurt us, and we can decide to learn how to do something else instead, but it's not helpful to put down our past selves for doing their best, even if the best they could do seems stupid or ineffective or self-sabotaging with the wisdom of hindsight. (Putting ourselves down was probably also a tactic that felt like it helped at some point.)










