And the law provides for that. The maximum they can have in counted assets is $3K. Anyone with a liquid cash position under $3K is not doing very well. But the law doesn't consider 401(k)s or most other types of retirement savings as counted assets. They also exclude your home and 1 car.
My opinion is that forcing someone to liquidate a 401(k) with the attendant penalties is just adding insult to injury.