A gifting economy is different from a barter or market economy in that valuable items are given away to those that need them, without any quid pro quo, exchange, or payment. Gifting economics (lots of great papers on this topic) were/are the economic heartbeat of hunter-gatherer tribal cultures, the social organization where we spent 99% of our time as homo sapiens sapiens. Barter was, in contrast, a mechanism for economic interactions between tribes.

This gifting economic system wasn't based on pure altruism. It did have an enforcement mechanism to ensure compliance with the system over the longer term. On the positive side, there was an intangible increase in the social status (using personal or societal metrics) of a tribal member that gifted an item. On the negative, a failure to offer hospitality or gifts to those in need was considered a mortal slight that could incite violence or expulsion from the tribe.

There were also a considerable number of drivers for gifting at the tribal level. Here are some:

The survival of the tribe, as a group, was more important than the survival of any individual. However, the loss of any individual could put the tribe at risk.

The generation of surplus and innovation was highly uncertain. Sharing reduced that uncertainty to manageable levels.

Sharing reduced internal friction that could put the tribe at risk.

Scalability

It's pretty clear that the societal drivers of tribal gifting economics and the mechanisms of enforcement didn't survive the transition to a global social system composed of billions of members. Simply, the connections between any two individuals (outside of immediate familial relationships) are too abstract for these drivers and enforcement mechanisms to be relevant. As a result, market based mechanisms for economic interaction have gained dominance.

However, the ongoing shift of the global market-based economy from a trade in rival goods (tangible items that invoke zero sum economics) to digital non-rival goods (items that can be copied at no expense or diminishment, endlessly) provides a window of opportunity. It may be possible to revive gifting economics for non-rival goods to amazing beneficial effect. Some ideas on how this could scale: