Easy. If I was trapped in a recently abandoned pickle factory, then I would survive on the food in the staff canteen, starting with what had just been prepared, such as pizza and sandwiches; after a day or so I would move on to see what was in the refrigerators, and finally work my way up to the frozen food. Oh, by the way, when they abandoned the factory, they forgot to turn off the power, so all the perishables are still nicely preserved.
Also, lots of things can be pickled, not just cucumbers. The word “pickles” makes me immediately think of pickled onions. There is usually quite a bit of sugar in the picking vinegar.
Just as well that I am not in the US then.