You can love someone and still choose to leave when the relationship becomes unhealthy or when you've been hurt too many times.
Love alone isn't enough, some people choose to prioritize their own well-being and believe walking away is best for both of them.