There is a criminal defense of "necessity." It might justify, for example, breaking into a cabin when you're lost in the woods and in need of shelter, or stealing food to prevent starvation, or someone driving while suspended to deliver someone to the hospital. It's actually a pretty limited defense, and seldom applicable because there are usually legal means to obtain the needed aid or resources.
In the same way, morally one might be able to justify stealing under desperate circumstances -- but only if other less morally objectionable methods have failed. And, even then, one would expect that restitution be made as soon as possible.
In the same way, morally one might be able to justify stealing under desperate circumstances -- but only if other less morally objectionable methods have failed. And, even then, one would expect that restitution be made as soon as possible.