It has a companion quote (also from music): "Love hurts."
Since people are only human, mistakes are going to be made and mistakes often hurt others as well as oneself. Marley is saying that he was willing to make connections with others with the knowledge that hurtful things can happen so he chose his connections carefully -- "the ones worth suffering for" (such as your child, partner, a sibling, a best friend).