There is no fallacy, just two perverse incentives in Capitalism, deriving from the fact that the utility of money is not fixed, and its marginal rate is not constant. (The same is true of power, safety, etc. when they are conceived of in terms of fungibility and rates of exchange.)
(Responding to the nature of the comments, let me be clear about what I mean by perverse incentive:
Capitalism, since it can state the value of objects only at the point of sale, has to use approximations of value that can be expressed a that point. The resulting gap between the approximation and the real value creates cognitive dissonance (as it should, being false). This in turn generates alternate psychological values. Those then create their own artificial utility by extension. And that gets served directly in spending decisions, contrary to the actual efficiency of money.
Modern politics is capitalist. We 'pay' attention, we 'spend' time, we 'save' lives, there are 'trade-offs'. There is a capitalist construction of value throughout our planning logic. It has the same difficulty with perverse incentive that all instances of capitalism have.
We assume constantly that the capitalist construction of exchange rate itself is the real representation of value. This is a fallacy. And that is far more interesting than this question. But it is not really germane to the answer, which is tied directly to a context of rating value in terms of exchange.)
Capitalism often values labor according to the time invested in earning it. Of course, that is not realistic, as productivity varies hugely, and real discovery or artistry is largely independent of the time invested. But it encourages us to value our time according to the rate of earning.
That means the utility of money is related to how hard you have worked for it. And in that frame of reference, the lottery can makes sense, especially for those whose labor is otherwise poorly paid.
There is a small likelihood of a big payoff with minimal effort (so the utility is a small number, times a big number, then divided by a very small number, which can still be a large number.) Winning would affirm a high value for your personal effort, contradicting, perhaps, negative messages that your time is not valuable. (God rewards you even if your boss doesn't.)
Capitalism also binds many of us to endless debt. Again, this is not too logical, as it injects a lot of fake money into the system disguising genuine value, and enables catastrophic default (witness Sept 2007). But it allows for money to be created out of nothing when it is needed, and can be used to stabilize markets. So it is the basis of the entire Federal Reserve system.
Given that frame of reference, the utility of money may take a sharp upward turn when it enables you to free yourself completely from some given obligation -- say, your mortgage. So there again, there is logic in your investment. Even though it is not a good investment in sheer monetary terms, the utility of the money is higher than the utility of the cost. (Being independently wealthy is far better than daily living, in the imaginations of many.)
Capitalism also pays premiums to compensate suffering.
More intricate forms of gambling involve getting paid to do something enjoyable. So if your value for money is related to how unpleasant it was to get ahold of it, this is a reasonable motivation to spend time and money in this way.
The same kind of utility computations apply to the scanners. Our culture claims that dying at the hands of criminals is far worse than simply dying. There is some extra negative value to being wronged by the criminal intent. So we keep the police armed with guns even though they kill innocent people regularly by mistake. It is somehow better to be shot by accident than on purpose, and the sense of safety seems worth the risk (to the culture in general, if not to me).
It also exaggerates the value of deaths that happen together. A war is somehow worse than the equal number of people who might die slowly of a pollution problem. This is not an error, it is a choice of values. So preventing 200 deaths that would happen together can be worth causing 2000 deaths that are not grouped. Because grouped deaths subjectively cause more disquiet in the population.
Disagreements about relative situational or marginal utility are not fallacies.