Let's try an example.
You drive two hours to meet someone at the airport. You drive her home, but all she does the whole way home is complain about her trip. It was so annoying that on the drive back, you wish you hadn't bothered to go get her. But when you got home, she gave you a dazzling smile and told you she was so thankful for the ride, and you felt a little better about doing it. Later, you say to a friend, "She complained so much I almost wish I hadn't bothered to go get her, but she really was grateful, so I guess it was worth it."