There’s loads of reasons women (and men) do this.
They just like moaning. And it’s seems socially acceptable to consistently moan about your partner
They like to portray the martyr. So they moan and moan, but actually they quite like set up and they enjoy portraying the hard done by person in the relationship
They aren’t happy. But not unhappy enough to actually do something
They have go stuck in a cycle of being miserable and genuinely can’t see how miserable they are
While they moan, they don’t share the good bit. Again, enjoying the attention of ‘oh that’s awful. You have it worse’
They feel trapped and the alternative is too scary
They prefer to miserable but in a familiar situation
They are miserable but like the lifestyle it affords
They have been low level miserable for years, but not enough to improve their situation so they can leave in a better position
They like the perceived status that comes with the relationship.
I think it’s likely to be one or a mix of the above.