He remained with her for a long time because he enjoyed the feeling of being in love. His heart is described as an empty well, craving connection and love from anyone who will give it to him. This suggests that his attachment is driven more by a desire to feel loved than genuine connection or commitment.
However, the narrator believes that this need for love from anyone isn't enough for her and won't satisfy him in the long run once he understands the reality. The quote reflects a deeper understanding that true fulfillment requires more meaningful and authentic relationships, beyond just filling an emotional void.