The ending reminds me of How to Get Away with Murder. When a man and woman slept with each other, because they had their heart broken by the same woman.
In a way, both of them will have a healthy relationship. They pour the same amount of "love" into the relationship.