It comes down to a inability to judge optimism and reality properly. Poor people are either too despondent about their situation so they're in a depressed state or they feel overly optimistic about their chances to win despite know that the ticket may state the odds of winning are 1 in 43 million or something to that effect. Instead of focusing on themselves to improve their condition the long arduous way they're looking for a shortcut. for middle class and rich people it's probably more of an excitement issue than a need to achieve some goal.