Depends on the situation. And it may be a combination of these things:
(1) fear of the unknown. A lot of people stick with a partner out of comfort, knowing that things aren’t great. But there is a strange comfort in expected and predictable unhappiness, as opposed to fear of possible happiness and possible unhappiness.
(2) fear of regret. You want to make sure you did EVERYTHING you could to make it work so that you don’t wonder somewhere down the line if you made a mistake. Unfortunately, it’s not possible to try everything. You try (at whatever level you think the situation merits) and it works or it doesn’t.
(3) fear of rejection. You want a reply to prove to yourself that you are desired and worth the trouble. It’s ultimately a lack of self-confidence and lack of belief in your inherent worth (which we ALL struggle with).
And I think that a major part of it is: (4) You still pursue the person and call/text constantly because you haven’t let go of “what might have been.” You might accept that things aren’t working and that it needs to end. You might logically understand that and in your heart believe it. But you haven’t allowed yourself to grieve the loss of the future you envisioned. Once you let go of that imaginary future, you can let the person go in peace. And you can be at peace in your decision.