@dolipret He isn't doing it to establish good relations, he's doing it because, while temporary, he is appreciative of the fact that the villagers harbored him and the rest of the refugees from Glory City.
In addition,
@givemersspls is correct in stating that, by definition, the villagers have leverage, because if no villagers decide to trade with him, he has no or very few stones.
@Eridian and
@ShiningMeow are wrong in their belief that he could gather them quicker himself potentially and that the stones are scattered everywhere respectively, and to provide more evidence from the novel, it's mentioned these stones aren't just littered around everywhere, and that you'd only find one every couple of days or so. The villagers have a high supply they've collected throughout years, they know where locations where the stones are that Nie Li might not, and most importantly there's a fuck ton of them, so they can easily find some for him. To Nie Li, as someone who GREATLY values his time and efficacious methods, this is a great boon. As stated, he's only staying for three days; going around and looking stones would greatly hinder both his cultivation and his endeavor to defeat the Sage Emperor.
HOWEVER, while this is partially the case, he is mistaken in the belief that this is a quid pro quo trade. As previously highlighted, our MC is doing this mostly out of the goodness of his heart because of a few good people like Yun Ling that helped him out in his previous life.
Edit: I'd like to correct what I stated about Purple Smoke Rocks' rarity. It is still definitely an exaggeration to say they lie on the ground everywhere, but they're not so rare someone can only find one every one or two days. They're rare enough to be described as "[despite efforts], many people only gathered one or two of them. Even though there are many Purple Smoke Rocks, they aren't everywhere".