I always ask questions like this, and then a little too late realize that my own answer (which is only fair to include) is maybe not the easiest thing ever to give fully or honestly.
The simple short form is: at different times, different aspects of all of these things -- including the unhealthy variations of some of them -- have been the draw, or at least one of them.
And, yeah, that covers it, but it really doesn't. Or, more accurately, it isn't the whole story, and to not tell the whole story in a community that sometimes can only agree on one thing -- that we like participating, to whatever extent, in telling stories together, no matter how differently we prefer to go about it -- that seems like cheating, somehow.
I link to this as often as I possibly can. It applies to the hobby in a variety of ways that I think are useful, and often enough, it's in that context. The transcript is there, so it needn't be watched, though if you've never seen it, I'd encourage you to watch it anyway. (It's one of the two things I watch on seemingly endless repeat when things get hard, and both of them help.)
The whole section beginning with 'Fourthly' applies, but this especially:
And remember that whatever discipline you are in, whether you are a musician or a photographer, a fine artist or a cartoonist, a writer, a dancer, a designer, whatever you do you have one thing that's unique. You have the ability to make art.
And for me, and for so many of the people I have known, that's been a lifesaver. The ultimate lifesaver. It gets you through good times and it gets you through the other ones.
Life is sometimes hard. Things go wrong, in life and in love and in business and in friendship and in health and in all the other ways that life can go wrong. And when things get tough, this is what you should do.
Make good art.
It is, ultimately, escapism, but of a unique sort: it's collaborative and creative escapism. And yes, laugh all you like, but creative writing is an art. There is no yardstick here; there's good art and bad art and good writing and bad writing but ultimately, this is a hobby of creative expression and creative expression is art. (So laugh all you like, but deal with it, I guess.)
Something this addresses in a more roundabout way is actually interesting as hell. It's something that was touched on briefly, I think, in the mental health thread, but it's worth mention here: different thought patterns, over a long enough timeline, help to rewire the brain. If you have particularly unhealthy wiring in your brain, brief bouts of 'playing make-believe' can, actually, improve your well-being by helping to create the structures that allow you to see positive aspects of the world you might have missed otherwise, because your brain simply was not structured to recognize them before.
This is not the same thing as 'exploiting fellow players for therapy', which some people do or have done from time to time, as it's not (and can't really be) a conscious process. It's essentially a side benefit of setting aside one's problems for a little while and thinking in a (slightly or majorly) different way, as most of us do when we RP.
In short, if you are in a shitty situation you can't see any way out of, sensible doses of escapism can be incredibly good for you. Not if you lose perspective and ignore the real world or value the pretend one more than the real one, obviously, but simply letting your brain work differently for a little while can be a very real help.
It is actually sort of awesome.
It is even more awesome that this is more pronounced when engaged in creative thinking, creative problem solving, and creative expression: as you do this, you are incrementally building yourself a new brain.
I'm a professional artist, hopping around amongst a variety of mediums over the years. (Please note what I said above, and further note I am in no way claiming that I am a good artist!) Creative things, be it visual arts, performance, writing, even writing code, are enormously important to me, even if they aren't things I'm personally doing, good at, or interested in doing myself at all. I think they're genuinely important on pretty much every scale, from the micro-micro 'creative thinking helps "grow" your brain' to 'a little creativity can make your living space a happier place' to how much a culture values and encourages creative expression on the macro end of the scale.
This one? Well, it's easy. (Or, it was.) It's a neat one. It's there more or less on demand at any hour, and really, considering there's always some code that could be written or a room that needs a desc or a plot to concoct for people or some other 'thing to get to' that requires creative thinking, it really can be something that's a great creative outlet even in the crazy hours when no one else is around.
That doesn't compare to the big one, though: RP chemistry. Everybody here probably has that list of writing partners that they cherish and consider amazing because for whatever reason, when writing together, the whole is so vastly astonishing compared to its component parts. Any given group is like a compound chemical. Sometimes, you create a new rockin' alloy, sometimes you fizzle out into grey sludge, sometimes it explodes into a gory mess. It's still one of those things where it seems like you can really see the buzzword cliche 'synergy in action', and as an actual thing, rather than as a buzzword, that's something pretty spectacular, as it can lead to the most surprising and remarkable places, even if they're completely imaginary.
Even beyond that, even amongst the people you 'click' with as a writing partner really well, the result of that 'compound chemistry' is unique. With some, I've found more drawn to scheming and very plotty things. Others, it's pure soap opera. Others still, the horrific and surreal explored in very Barker-like ways. Once in very long a while, Penthouse Forum letter. <cough> Plenty of other things, too. It varies, and god damn, that's interesting as hell unto itself. (To me, at least.) Different partners bring out different things, and that means all of those new places for the brain to meander can sometimes be pretty unexpected and fantastic. (They can be dangerous, too, but those things are often easier to notice and avoid than they might be; often enough we know when a story is making us miserable and we'll drop it, after all.)
This... combines with another thing, for me. Stories. I love stories. I love making them up myself, with others -- I even enjoy just finding entertaining ways of telling ones that recount some real event of the day, or knowing a real event generated an interesting one to tell later. (I collect those. Seriously. It's my very favorite collection of all.)
That famous quote about how the universe is not made of atoms, but is instead made of stories? It resonates strongly with me. It's something I think of as a profoundly human truth. Stories, ultimately, are how we relate to each other, learn to empathize with one another's experiences, and understand certain things about the world we live in on a very basic level.
There's more to this, but it's OMG'o'clock, and the coffee's low. Happy Easter or happy day before a bunch of chocolate gets marked down to 50% off, whichever applies in your case.