In is difficult to understand why the commandments regarding gifts to the poor are inserted in the midst of the section on the festivals especially since they already appeared in 19,9. Various opinions are expressed by the commentators, The Sforno offers his own explanation.
Since the offerings on Shavuos are brought in order to give thanks to HaShem for the blessings of the harvest, the Torah now teaches on how to insure and conserve that blessing. It requires continuous acts of righteousness and kindness which means to share one’s good fortune with those less fortunate which preserves one’s wealth. This accords with the saying of Chaza”l (Kesuvos 66b), “to salt (preserve) wealth deducts from it, and others say (do acts of) kindness (to preserve the wealth).”
