There is no risk if you won the lottery. There should be no issue in claiming the lottery. The real issue is that if you do not win the lottery all your invested funds will be lost. That's the only reason i do not invest in lottery as it is too risky.
It is wrong to say that you "invest" in gambling because you dont. You gamble your money in trying to make more money and the method is lottery ticket buying. Investment is something of a broader term here and although this is debatable, I consider gambling to be a mode of entertainment and not a mode of making money. The only person making money is the bookmaker.
Whether you decide to buy lottery tickets is your choice. I see people of lower economic strata, not having much of a savings to do, waste their money gambling and buying lottery tickets. Its because they are trying their luck because they have nothing else to depend on.