There is an aspect of gratitude that remains even under robust capitalism, and that is personal love, such as between spouses, parents and children, or friends.
Now as I noted before, when one does good to someone he loves, the profit to the beloved is his profit, as well. But there is a complication. Personal relationships are complex, and one is rarely a mind reader. Therefore, there is a need for a somewhat ritualistic expressions of gratitude to assure the benefactor that his efforts have been enjoyed by the recipient of the benefits. That should be sufficient to satisfy the benefactor, as well.
Parents, too, need feedback as to whether their efforts are bearing fruit. The gratitude of children is precisely that. The children need not even necessarily repay the parental favors; their success and happiness in life are their own rewards to the parents who build their children up when they are young but ultimately leave them in command of their own counsel. But a sincere show of gratitude is still useful.