The more intimate you are with someone, the more you're also aware of their pain and hardships. Intimate relationships involve conflicts and require compromises you would be able to avoid or not get into in a more distant relationship. They involve vulnerability and trust.
The vulnerability and trust and the deep emotional meaning that intimate relationships have can make those conflicts all the more painful. Sometimes the compromises required or the shared pains can amount to damage.
Of course that's not the only side of intimate relationships, as the metaphor also says. I'm not sure I'd agree with the interpretation that we (or most people) should be wary or moderate with closeness to other people. But I do get the idea that it's not without a significant cost that wouldn't be there when keeping a greater distance.
Where each of us falls on the spectrum between the joys and pains (or even damage) of close relationships probably depends both on personality and our experiences.