A person working for a paycheck doesn't provide value to a community, only to their employer. Chronic unemployment, however, does harm a community. The explicit physical need for food, shelter and access to medical care outweighs the implicit value in the dignity of labor.
> Charity is not a legitimate role for government.
Don't consider it charity, then, consider it insurance, or just another public service like the police or fire department.