They might if sugar was able to be consumed for free with virtually unlimited access. I'm not sure it's a very good analogy.
Lastly, I’m not sure you made any case that pornography is relatively safe.
The reward of lotto tickets is a function of cost with the current approach, but that’s the wrong point to get wrapped around the axle. Consider instead that if the lotto reward is funded by taxes. The point is the risk/reward profile gets skewed.
As an aside, I’m pretty sure you can find evidence that excessive gambling is a net negative.