Real life is hard to understand, arbitrary and often unfair. A person in real life is rarely empowered, frequently feeling as though their life is purposeless and essentially at the mercy of the fates. But a game is empowering.
You can play it, you can get better at it, and if you do then you will accomplish. You will plant that virtual garden, save a princess or score a triple word score because of your own ability and nothing else. You will win.
The levers of play within that world are simpler than reality, and so the path to accomplishment is clearer than reality. You therefore feel that you have a chance of winning in a game in a way that you do not get in life. You get to engage in heroics, or to be in charge, to do things that you could not normally do and overcome scenarios that you would not normally overcome.