I don't think this has anything to do with greed. If it were, after losing a little here and there, a truly greedy person would stop gambling and walk away because this very greed would prevent him from losing any more. In other words, his greed would make him loathe gambling in a short while. I suspect we should rather talk here about gambling addiction, which is not particularly different from, for example, alcohol or drug addiction.
Does greed have anything to do with these?
This is what people come for when they start gambling. But when they start losing is it really greed or something else already? In my view, it can't be greed because they are losing while greed is about earning. Really, how can they envision themselves rich and wealthy when reality kicks them straight in the face? People are stubborn as fuck and when they see losses, they are trying to win these losses back. I don't think we can really call them greedy, they are desperate, frantic, addicted, or whatever. How many people would be greedy in these circumstances?
Some emotions seem to be mutually exclusive.