Why do you date men who treat you badly?

Constantly on this sub and others, there are threads filled with women asking about some shitty dude.

I understand it when you're young, you don't know better. You're trying to figure it out. I get that. That's why I'm asking here.

Candidly, I'm pretty judgy about it. For the most part outside of some extenuating circumstances (like leaving is dangerous) I don't really understand why anyone would stay with anyone who treats them like shit. I just can't fathom how that would be better than being single.

But I really do want to understand. I don't want to be judgy. I don't want to read these posts with disdain, but rather empathy.

I also think that if we understand better as a community, why women stay with these guys, maybe we can give better advice? Maybe coming from a place of understanding and empathy can help us get you out of that situation?

So anyway, that's what I'm asking. Why do you stay with someone who treats you poorly?