Stealing is obviously wrong.
Having compassion for people who, under duress, once or twice in a lifetime take small things because they are desperate/unwell/bereft/etc isn't wrong.
They used to transport hungry children who stole bread.
I'm going to be honest here. Through no fault of his own my husband was made homeless when he was a teenager. He slept in the floor in other people's sheds and barns (without permission) and, on occasion, when he was hungry, he stole food.
He literally pulled himself from the gutter, got a job and by the time he was 20 had started contributing to society. Has he ever paid back the people he took things from? No, but he has paid his way, paid tax, he volunteers for two charities (including Shelter and our local homelessness charity). He is the most honest, kind, decent, honourable person I have ever met.
People in extreme situations don't always act rationally or do the right thing but it doesn't make them bad people.
Being unable to see shades of grey or an absence of compassion because, 'I've been in a tight spot and didn't do it' aren't virtues.