This point has been treated in detail elsewhere.
Not every case in which a person’s need is met through some means implies that the means itself is legislated and enjoined. During his lifetime the Messenger of Allah ﷺ was often asked for something and would grant it, never turning a petitioner away, even though the very act of asking might be forbidden for the one who asked. He even said, “I sometimes give a man a gift and he leaves with it tucked under his arm as a brand of fire.” They asked, “O Messenger of Allah, why do you give it to them?” He replied, “They refuse to stop asking me, and Allah refuses that I should be miserly.”
A person may also perform an act he believes to be righteous without realizing that it is in fact prohibited; he is rewarded for his good intention and excused because of his ignorance. This is a broad principle.
Many of the innovated devotional practices that have been forbidden may still yield some benefit to those who perform them, but that does not prove they are licit. Had their harm not outweighed their benefit, they would not have been prohibited. Moreover, the practitioner may have a plausible interpretation, or be a mistaken mujtahid or a follower; his error is forgiven and he is rewarded for whatever legitimate good is mixed with the illegitimate, just like the mujtahid who errs. This, too, has been discussed at length elsewhere.