In a massive earthquake that knocks out the power grid you could be trapped for some time before crews reach you to free you even if the building is structurally unharmed.
Based on the other comments, it seems like it's more in case there's an earthquake or something and the elevator is stuck under rumble.
If you were trapped in an elevator under rubble for a few days, it'd probably be nice to have a snack on hand.