Escape - Bored with their everyday lives, stressed, etc.
Travel to Imaginary Worlds or Visit Places they aren't willing or able to visit in real life
Experience Life as Someone Else
to Feel Powerful - a lot of people these days might feel powerless in their real lives
Just to Pass Time
Read Stories While Playing
Reasonably Cheap Entertainment
Feeling of Being Rewarded for Effort
Keeps You Busy (and possibly out of trouble)
Replacement for Another Hobby
As for World of Warcraft and its many clones and imitators with different bells and whistles: Believe it or not, some people seem to enjoy endlessly spinning on a hamster wheel grind ladder. Pretty much just gaining power for the sake of power or to kill other player-characters sometimes. Whoever invented endgame raiding was a sadist.
IT'S BETTER THAN WATCHING TV. Most of the time. Usually.