R' Zevin writes in "A Treasury of Chassidic Tales" page 291:
R' Yehuda Tzvi of Rozla was once visited by a Chassid who gave him a kvittel (prayer request) with the accompanying traditional pidyon (money given to a Tzaddik).
The Rebbe asked him (rhetorically) how he, the Rebbe, was allowed to receive a pidyon; after all, the money is only given on assumption that he is a Tzaddik. As he (the Rebbe) knows his own worth, how could he take money given to him on false assumptions?
The Rebbe answered that there is a Gemarah which says that Yirmiyahu cursed the people of Anasos that whenever they wanted to give charity, they should give it to undeserving people.
One could ask, why did Yirmiyahu curse the Jews? It would be hard to believe that he hate those Jews so much.
Rather, the world operates on the principle of Isarusa Dile'ela (an awakening from above) is dependent on an Isarusa Diletata (an awakening from below). Now the situation of the Jews of Anasos was hopeless. They didn't deserve to be saved. The only hope for them was supernal kindness not dependent on the merits of the recipients. Therefore, the only way to get such supernal kindness is through giving to people not deserving of kindness.
Now the Rebbe answered his question. Through the Chassid's giving charity to an undeserving person, he (the Chossid) will be saved even though he is undeserving.