Everyone gets some entertainment(eg. television, video games) Notice that oftentimes(Not always) people with terrible lives, engage in massive amounts of entertainment for hours on end. Those with great lives don't often do entertainment as much.
The reason people like anime is very much the same reason anyone likes any other form of entertainment.
It's a distraction. It takes you away from the troubles of your own life.