Quran 2:219 Says Prohibitions (Gambling, Alcohol) Have Benefit?
Quran has commented on the whole activity i.e. charity done via gambling and drinking. Such a charity is not accpetable in the eyes of God that is done through prohibited earnings even if there seems to be an apparent benefit of such a charity (i.e. helping the poors ); but in the eyes of God, such a charity will not earn any reward. It can earn worldly benefit, but not reward in the books of Almighty becuase the immoral aspect of such an activity ( haram earnings ) have a great sin in the eyes of Allah and any good done through any benefit repaed from a such a sin will render that act useless in the sight of Allah. It is not a rebuke of charity, instead such a chairty should be done from pure earnings and not from impure earnings.