You think that charity properly handled the poor?
Also, if testing for drugs was by any means efficient I'd be in favor of it, but in light of the recent terrible efficiency of testing vs results and economic problems, I'd say there's a far better use of public funds than spending it on testing that has very little in the way of results.
And yes, most government entitlements are extremely strict on what you can and cannot spend them on. Heck every single citizen benefits from government assistance in subsidies which are built into the prices of things you buy. Do you think they just give 40k to people and tell them to spend it on whatever?
You're also saying this like it isn't already illegal to be on drugs for assistance or misuse assistance funds.