Rejoicing in other people's happiness or good qualities is one of the purest of all virtuous minds, for it is unstained by self-cherishing. When we practice giving, for example, it is possible that we might hope for something in return — for gratitude, to be liked, or to be thought of as a generous person — but when we rejoice in another's good fortune, we expect nothing back in return.

Rejoicing in the good fortune of others creates the cause for us to enjoy similar good fortune in the future, and rejoicing in the good qualities of others creates the cause for us to develop similar qualities.

Geshe Kelsang Gyatso, How to Solve Our Human Problems