Society and culture advocate generosity, but such behavior often requires one to contribute one's own resources to the interests of others, so it is difficult to explain with general economic theory. However, some neuroscience papers have pointed out that even at the expense of self-interest, some people are generous to others because when people show generosity, they activate specific areas of the brain. and these areas are associated with areas that produce happiness.
Generosity can increase happiness is one of the reasons why people treat others generously according to this passage.