As far as I've seen, codependency is usually a pre-existing condition for people in alcoholic or otherwise toxic relationships.
Personally, I think the term is applied too broadly and I never identify myself as a "codependent". I certainly display codep behaviors from time to time, and for me this stems from growing up in a family system drenched in the disease of alcoholism. I didn't choose that situation. I was born into it.
The toxic relationships I've chosen since then? Those, I volunteered for. For today, I choose not to involve myself in toxic situations with toxic people any more than is absolutely necessary. Otherwise, my sanity suffers.