From _delirium's comment, it sounds as the poor do have most/all of their basic needs met, though he doesn't address policing. Piecing together your comment and his, it sounds as if the only basic need the poor have which is not met is adequate police protection. Is this correct?
Your sentence ending in "comes from the point of view of people living comfortably" implies that from the point of view of someone else (presumably a person living in a crime-ridden neighborhood), the lottery is not irrational. Could you explain why, if that is indeed what you meant?
(Note: I actually do live in a crime-ridden neighborhood. But I'm also a 6'6" man who looks like he has nothing worth stealing, and I've only been the victim of a single, unsuccessful, attempt at robbery. So my point of view might be atypical.)
The idea of a "tax on the stupid" comes from the point of view of people living comfortably. If most of your basic needs are met then gambling money on the lottery seems like irrational behavior (throwing your money away when you only have a small income to begin with).