The unresolvable problem of homelessness is this: how do you house these people without concentrating poverty? The reason this is unresolvable is because if you build housing only for the homeless, that is by definition concentrating poverty. If you try to house them in multi-family housing, those who live there who work and pay taxes will move out, because unfortunately many of the homeless bring anti-social tendencies with them (and nobody wants to live next to a person addicted to drugs, even if they're on the path to recovery). This experiment happened in both the Netherlands[0] and in St. Louis[1].
This isn't an easy solution that just requires "political will". It's a very complicated problem that requires the study of incentives, mental health, economic factors, etc. (all mentioned in the original article).
[0]: https://en.wikipedia.org/wiki/Bijlmermeer [1]: https://en.wikipedia.org/wiki/Pruitt%E2%80%93Igoe
This does not apply to restaurants only FWIW.
https://kingcounty.gov/en/legacy/depts/dnrp/solid-waste/prog...
There's logistical issues, like: restaurants are busy and usually can't spare somebody to go find somebody to take excess, having excess is unpredictable so setting up a system is hard, having 8000 loaves of bread or whatever is too much (nobody wants to eat that much bread), etc.
Also if the restaurant/grocery/etc. is getting rid of food, it's usually in the neighborhood of not being suitable for consumption anymore. If it's not suitable for consumption, you can't really make a great case for then collecting it and giving it to somebody to eat, even if they're hungry and poor. So you need someone to have good food, care for it safely, but not want to use/sell it but still go through a lot of effort to get it to somebody who can use it.
There absolutely is some room in there for like "yeah we're getting rid of this because we don't want to sell it but it is still absolutely safe to consume", but it's just a difficult needle to thread in an area of society where there's never enough money or manpower.
The devil is in the details, but this may be one way to go about it, even if not daily, even if not perfect.