I believe the answer is: indirect benefit
Indirect benefit refers to the type of benefit that we had from the action or existence of another people. In the example, the bond that formed between the two did not necessarily exist because of their actions/behaviour but because of their similar experience of taking care of other people.