I suppose that it's mostly (but not exclusively) related to escapism. It was especially true back when I got my NES, when I was around 9 years-old or so (and all things considered especially in retrospect that's relatively 'late', since most long-time gamers I speak to usually say that they first got their first console or first played video games at around age 6 or 7... but that's another subject).
I could write nearly a novel on this subject, but the very long story shortened ends up being (mostly) about escapism (out of "reality" and boredom) into fantasy and fictitious worlds. It wasn't merely a "hobby" at the time, it was more about a young boy who had just discovered that "this stuff" even exist to start with, and that "this stuff" allows me to stop worrying about real life things, and become a hero in a world that prior to me finding about video gaming's existence I would only have been able to dream about. And the age context only reinforced my fascination and love for video games. At age 9 or 10 the brain is just in full mega growth mode, like a sponge, absorbing about every single atoms and bits of info and data from the surrounding world and people. It's usually from such early period of time during a person's youth that we 'discover' the things that fascinate us, then we pinpoint (or the brain does so) the stuff that "marks" us the most and we stick to it, or we get influenced by it heavily (at least for a period of time). I cannot possibly count the number of associations that my brain made with (mostly social) life and video games. It's definitely more than just a hobby, like... reading books from time to time, or drawing something every now and then, or going at the theaters once every few weeks or months. It was more about the brain saying "Look, I know the real world is there, but the real world does not offer this; so stop waiting and go play me some games k?".
I think that the escapism part, however, certainly decreased in significance over the years, but it's still there. At this point I've been playing video games (if I consider the ones I played at friends' places before I actually got my own NES) for approximately 27 years of my life. And I haven't skipped a single year without gaming. In fact, I think that the longest I've been without playing games might not have been more than maybe 2 weeks max (which would only happen during some summers back during early high school years). What I do clearly know and feel, still to this day, is that whenever I play a video game that I actually like (obviously) I just lose the perception of time. And that's usually to a point (sometimes, not always) that I not only forget what I otherwise "should" be doing (dishes, errands, calling someone, etc) but I also don't care anymore. I do still feel sometimes ' absorbed' ("escaped") into the game I'd be playing. Which brings me back to my number one, 'main' reason as to why I play video games. It's indeed because as soon as I like it enough, essentially, I stop caring about the world around me. It's a general manner of speech, it's not literally me not caring about real people, friends and family and not caring about having a social life. It's just about momentarily not having to worry, and not being 'obliged' to focus on anything else that would potentially be a source of stress. It's a "zone of comfort" (a "bubble") in which I can escape temporarily, while allowing myself a moment or two to simply not care about the rest, and just enjoy my time with worlds, characters and stories.
So yeah, mostly escapism.