What you’ve shared is essentially Dharma. Or giving back from a sense of duty, or as a matter of principle.
Interestingly, Karma preaches: if you give to those in need, you will receive in return when you’re in need.
Although the motivations are different in both teachings (Buddhism vs. Hinduism, with carrot vs. stick if you will), they have the same effect - to reach an equilibrium in society.
I see this simple version of Karma talked about quite often in the general public and it's pretty far from my understanding of Karma in Buddhism.
Karma is a consequence of Dependent Origination - basically that things arise dependent on other things, and there is nothing that's outside of the law of cause and effet (hence no eternal, unchanging, eternally happy Self, which is the type of Self, or soul/atta(pali)/atman(sanskrit) the Buddha was talking about).
Karma means your intentional thoughts and actions all have consequences.
If you give to those in need, that ripples through the world and yeah, you're more likely to get good things because you're building a good life. There's no need for a "cosmic justice" that will weigh what you did and give you the exact same amount when you're in a similar situation. You have more probability of receiving help (cause you've got friends now), but you might still be unlucky and don't receive any help.
That's on the material level but it goes further than that - by acting and thinking wholesomely, less based on your own craving and delusion, you're cultivating a mind that's less likely to act based on craving and delusion. It's simple cause and effect again, and it depends much less on external conditions since it's internal.
(Now the word Karma is used differently in different tradition, so the general idea of "cosmic retribution" might be what it refers too in some of those. When I understood more this version of Karma it made a whole lot more sense, so I'm sharing that here.)
What you’ve shared is essentially Dharma. Or giving back from a sense of duty, or as a matter of principle.
Interestingly, Karma preaches: if you give to those in need, you will receive in return when you’re in need.
Although the motivations are different in both teachings (Buddhism vs. Hinduism, with carrot vs. stick if you will), they have the same effect - to reach an equilibrium in society.
Edited: For clarity