Depends on why they don't have food.
Im in the high risk category for future homelessness, and if I were to become homeless, I've already decided I would rather steal food than go hungry. But that couldn't be seen as me getting justice. I'm homeless for the choices I've made, nobody else.
But here's the thing, most people I know would agree with both of those statements, they would steal for food, as well as it would be their own fault. Most people I know, would also be unlikely to press charges against homeless people for stealing food from them, even if they were homeless through there own doing.
This, to me, is the difference between justice and revenge. Revenge is just an eye for an eye (I'm thinking of Saudi), just a "f^^k you, see how you like it".
Justice takes into account the mitigating circumstances and allows for compassion, forgiveness, understanding.