I don't think your examples are that plausible in the real world, at least not in terms of the reasoning you give. In your scenarios, it would be much better to hide the money away somewhere and let it accumulate, pretending to the world (and to Uncle Sam) that you spent it on crack or whatever, than to actually spend it on crack.
Having said that, if we determine the rationality of some behavior relative to the actual utility function of the individual, then we can see that for some (possible) utility functions, it would be rational to play the lottery and spend lots of money on crack. The a posteriori question is then whether there are in fact such people who are acting rationally relative to a pathological utility function, or whether they actually have sane utility functions but fail to act rationally relative to their utility function.
If we consider rationality in relation to a pre-existing utility function though, what is it that would allow us to recognize our utility function as being dysfunctional, which we seem to be capable of doing? Is there a different utility function that governs the selection of utility functions that govern behavior (which implies an infinite regress) or does the One True Utility Function govern itself and changes to itself, in which case it seems it would be possible to have a utility function relative to which smoking crack is always rational and relative to which any tweaking of the utility function to make smoking crack have less utility would be irrational.
A more plausible rationale for playing the lottery, as many have noted, is that spending $1 on a lottery ticket gives the individual non-financial benefits of more than $1 -- like keeping them from despairing that their life will ever improve, giving them warm fuzzies that result in better mood (and the attenuation of health problems that we know result from poor mood), etc. A small amount of hope is worth much more than $1 in many cases, and the less you have of it initially, the more it's worth.
The lottery came up in a recent comment, with the claim that the expected return is negative - and the implicit conclusion that it's irrational to play the lottery. So I will explain why this is not the case.
It's convenient to reason using units of equivalent value. Dollars, for instance. A utility function u(U) maps some bag of goods U (which might be dollars) into a value or ranking. In general, u(kn) / u(n) < k. This is because a utility function is (typically) defined in terms of marginal utility. The marginal utility to you of your first dollar is much greater than the marginal utility to you of your 1,000,000th dollar. It increases the possible actions available to you much more than your 1,000,000th dollar does.
Utility functions are sigmoidal. A serviceable utility function over one dimension might be u(U) = k * ([1 / (1 + e-U)] - .5). It's steep around U=0, and shallow for U >> 0 and U << 0.
Sounds like I'm making a dry, academic mathematical point, doesn't it? But it's not academic. It's crucial. Because neglecting this point leads us to make elementary errors such as asserting that it isn't rational to play the lottery or become addicted to crack cocaine.
For someone with $ << 0, the marginal utility of $5 to them is minimal. They're probably never going to get out of debt; someone has a lien on their income and it's going to be taken from them anyway; and if they're $5 richer it might mean they'll lose $4 in government benefits. It can be perfectly reasonable, in terms of expected utility, for them to play the lottery.
Not in terms of expected dollars. Dollars are the input to the utility function.
Rationally, you might expect that u(U) = 0 for all U < 0. Because you can always kill yourself. Once your life is so bad that you'd like to kill yourself, it could make perfect sense to play the lottery, if you thought that winning it would help. Or to take crack cocaine, if it gives you a few short intervals over the next year that are worth living.
Why is this important?
Because we look at poor folks playing the lottery, and taking crack cocaine, and we laugh at them and say, Those fools don't deserve our help if they're going to make such stupid decisions.
When in reality, some of them may be making <EDITED> much more rational decisions than we think. </EDITED>
If that doesn't give you a chill, you don't understand.
(I changed the penultimate line in response to numerous comments indicating that the commenters reserve the word "rational" for the unobtainable goal of perfect utility maximization. I note that such a definition defines itself into being irrational, since it is almost certainly not the best possible definition.)