Y am I like this

Why do I keep going back to him? We’re not even together, he’s not my boyfriend. The sex isn’t good, why? We argue so much, delete each other and then it happens. All in a cycle.