It might be cheaper to take the money and give it to everyone than build an elaborate means-testing system that requires taking far more information, a more complex computer system, more arguing over corner cases, and so on.
Straight handouts appear to be by far the most effective way of reducing poverty and its negative effects. It's rather like the War On Drugs; you can choose a system that moralises at people or one that improves their outcomes, but if you want to improve outcomes you have to give up moralising control.