Virtues of Sadaqa....a pure intention.

From the times of the Sahaba, an incident is narrated by a certain sahabee…name unknown.

A pious man one day intended to give sadaqa in the still of the following night in the path of Allah SWT. He set out that night, and found a man on the street, and gave him the sadaqa money, and returned home.
The next morning, the people around town were talking about someone having given sadaqa to a thief. The pious man, downcast at his lost attempt at sadaqa, once again intended to give sadaqa in Allah SWT path the following night.

He set out the next night, found a woman, and gave her the amount he had intended upon, and went back home, thinking that it was unlikely for a woman to be a thief, so very likely his sadaqa went into the right hands this time. The next morning, people around town were talking about someone having given sadaqa to a prostitute. The pious man, distraught, but still full of devotion to Allah SWT, again intended on giving sadaqa the following night.

He set out the next time, again found a man, and thinking that one out of three would be a deserving case, gave him the sadaqa money. The next morning, people around town were talking about someone who had given sadaqa to the richest man in town.

That night, the pious man, thinking about his three “failed” endeavors at giving sadaqa, prayed to Allah SWT and asked Him as to why his sadaqas were not being accepted.

That night, in his dream, Allah SWT informed the man that all three of his sadaqas were accepted.
The first one, Allah SWT put in his mind, that being a thief, very likely the guy would swear off of stealing, since he had gotten money.
The second one, Allah SWT told him, would help rid the woman of her shameful business, since now she knows that she can get money without indulging in shameful behavior.
And about the third one, Allah SWT told him that the rich man, upon getting more money, would be less attracted to it, and would be inclined to give away to charity himself.

So in effect, all three of those were positive contributions by that man, and the main points to look for here are that 1)Allah SWT looks at our intentions, nothing else, and 2) as Allah SWT said in Surah Al-Kahaf.18:68. “And how canst thou have patience about things about which thy understanding is not complete?”
We do not have knowledge and understanding of Allah SWT “hikmat”, and hence should not attempt to figure it out for ourselves in everything. Some things are just meant to be, and we should have belief in Allah SWT regarding them.