One of the main lessons that we see taught throughout the book is that generosity can come in all forms, and that even in your own darkest hour, generosity can be the most powerful thing you can give to someone else.
We see this in two main ways in the novel - the journey across country and Rose of Sharon feeding the old man at the end.
As the Joads make their way out west, they take care of and invite along many other travelers. They share whatever they have when they do, and they don't have much. Although the situation they are all in sets up a perfect "me versus them" potential, that is not how the Joads approach this trip or their fellow travelers. In fact, instead of being selfish, we see them being very selfless.
Toward the end of the book, when everyone is taking refuge in the barn, Rose of Sharon nurses a grandfather because he has been unable to eat. This shows the pinnacle of compassion and generosity because she has just delivered a stillborn child and yet, in her time of grief, she chooses to give that child's breastmilk to someone else who needs it to live. In the days before breast pumps, she feeds this perfect stranger the only way she can, by allowing him to literally nurse directly from her breast. His need outweighs her grief and perhaps even her feeling of awkwardness.
So, from the novel, we see many episodes of generosity and it reminds us that we need not have a lot to give a lot.