Unless I’m a gambling virtuoso who earns millions a month then no, I wouldn’t donate my whole earnings. I might donate a couple hundred dollars to the needy but let’s be real here, gambling profits would likely go into booze, leisure things or even back to the gambling house again, but never directed to charitable institutions and the likes. Sure there are gambling events that donate most of the earnings on charities but for the laymen, the common degenerate gamblers, this wouldn’t happen.
Only the rich gamblers are doing this kind of thing. Donating their profits to those in need.
For sure, most of the gamblers who are gambling online or offline are either the average people or poor (greedy) people and they don't have the power to donate their profits to those in need because they really need it. Most of the gambling profits are either spent for food, pleasure or putting it into gambling again.
Although I do not donate the proceeds I earn in gambling to charity, I always make it a point that I treat my family members or buy them something unexpectedly. Like what I have mentioned before, all the income that I earn from gambling, I consider them as something that should be quickly disposed as they might be a bad omen if I keep them long.
In all honesty, it is actually a good practice if people were to use their winnings in buying something that would benefit others than just gambling it again in the casino.