That's why we should be prepared. The time to stock up on food isn't when the mob is smashing store windows! In reality it may be pretty hard to track down looters, especially those stealing food. If there's a disaster that knocks out the power there probably won't be surveillance cameras working. Stealing electronics to sell later, that would leave more of a trail.

The only area of legality that would concern me would be self defense. If some type of disaster caused a breakdown of law and order locally and I had to defend myself with lethal force, the person I was forced to kill would still be dead when the lights came back on. I would fully expect a reckoning at that point. I'm a CCW permit holder and take the responsibility very seriously, and I would only use lethal force in the gravest extremes of self defense.

In some situation where you would be forced to something technically illegal you would have to let common sense and necessity help you decide the issue. If you got lost while skiing and were hypothermic and stumbled upon a vacation cabin, you may be faced with the choice between B&E and freezing to death. I think the choice is pretty obvious in that case, and I would hope the owner of the cabin would be understanding. Just as obviously one would expect you to pay for any damage and any items used (eg food, heating oil, etc).

I don't know exactly what your liability is if you get into trouble while doing something stupid, and someone is killed or injured while trying to save you. It bears investigating but I go out of my way to avoid being in the running for a Darwin Award.
_________________________
“I'd rather have questions that cannot be answered than answers that can't be questioned.” —Richard Feynman