Where community service works if for e.g. misbehaving kids with non-absentee parents. Because then the parents make sure the kid actually does the community service, and the kid is thereby deterred from doing it again.
If you do the same thing for someone who is going to blow off the community service, then you'd need the police to make them do the community service, and police get six figures in salary and benefits, so that's a very expensive babysitter and you've eliminated any kind of net benefit.
I’m not proposing moving from these people providing $0.00 to taking whatever a person to monitor their work and provide institutional food costs, I’m proposing we move from these people costing a society a shitload, both financially and health/safety wise, to perhaps similar financially, but removing the health and safety burden and finally putting them on a path to success.
It also costs a lot more than building homeless shelters. It even costs more than mental health services and welfare programs, neither of which are cheap. It is quite possibly the most expensive option that anyone regularly proposes.