So, to the OP, I can give a pretty accurate summation of what “in general” will cause people to do this.
tl;dr – the brain is complex as hell and will actually adapt and adopt coping mechanisms to deal with negative experiences. Once those coping mechanisms are well established, they override the part of the brain that makes logical decisions, so it is nearly impossible to break out of the cycle without hitting rock bottom.
So, basically what happens is when we experience negative events–anything from bullying when younger to stress at work to relational trouble, we develop coping mechanisms. A coping mechanism is anything that “separates” us from the negative experience in that moment and give us a serotonin or dopamine boost to feel good.
Coping mechanisms can be such things as smoking, over-eating, drinking, drugs, sex/porn, and playing games. All of these distance us in the moment from our problems and dump the feel-good chemicals into our brain.
Over time, our brain creates stronger pathways so that the behavior/coping is much easier to do. Think of a hiking path–the more it gets traveled, the easier it is to walk down. Also, the emotional/fight or flight part of the brain has many times more connections than the logic part of the brain, so it is MUCH more natural to react based upon emotion than reasoning.
These people get used to games dumping the feel-good chemicals into their system, and the brain learns that whenever negative emotions or experiences surface, to turn to games.
The crazy part is, this can create a type of negative spiral. Not only do real life events cause the person to turn to games, but when negative experiences happen IN THE GAME, the brain STILL says to keep playing the game. As a result, even when they say they “hate the game”, they still play because the brain is telling them that’s how to feel good.
I decided to give a little more info on how to “break out” of the cycle.
Lo-and-behold, having positive relationships with people dumps TONS of the feel-good chemicals into your system and being able to talk through the crap happening in your life with someone who isn’t going to judge or betray helps rid the need of those coping mechanisms.
The hard part (and why most people choose to isolate and rely on those coping mechanisms) is that people aren’t perfect. If you can find a good friend though, it’s 1000% worth it.
Also, like Xaryu says in his streams–do your Dailies!