There is no single answer, and anyone who claims otherwise is oversimplifying.
Some people play to escape — a game is a place where the rent is not due and the inbox is empty. Others play for the chance to do things they never could in real life: fly, explore a dead planet, conduct an orchestra, build a city. Some are in it for mastery, chasing the clean run or the higher rank. Many are there for the people, using the game as a shared space to keep up with friends. And for a lot of players, the appeal is simply that games are the most flexible storytelling and problem-solving medium we have.
Ask ten players and you will get ten different reasons, which is probably the most accurate summary available.