Among other things.
Let me turn this around--given that it's an invasion of privacy and increases costs, what's the argument for it? If it's that they're wasting the money that's intended to help them live, should we also test to see if they've bought cars? Computers and phones? TVs? Microwaves? Refrigerators? How about alcohol, cigarettes, or even unhealthy food?
It appears to me (somewhat uncharitably, granted) that for most of the folks who support testing, the answer is that drugs are bad (m'kay?) and drug-users are bad people and we want to make sure welfare money is going to the deserving poor and not to bad people who don't deserve it.
And as others have said, why stop at welfare? What about other government benefits? Hell, what about government deals with private contractors? Shouldn't we drug test their CEOs to make sure they're not just spending their profits on drugs?
As Amirox says above, it might be useful to find these people so that we can help them. But that's not the standard framing of this argument.