The law of generosity was not invented by humans. It exists as a natural law of the universe, and is expressed on our planet in the natural abundance that nourishes new life from the old.
Human civilization formalized this law of natural relationships first in stories, then rituals and ceremonies, and eventually in codified laws. From time to time, when human beings strayed from observance of this natural law--due to trauma and fear--corrective remedies and ameliorating narratives led them back to core lessons learned from seemingly endless trial and error.
Stories and narratives developed by sick societies to oppose the law of generosity have persisted for some time now, and they even developed cults of cruelty and cultures of insanity, but generosity keeps coming back. Opposing it is like trying to stop the tides and winds, or plate tectonics.