pickled cucumbers seemingly lasting "forever"
I have to admit I am speculating a bit here. Your pickles are fermented, which itself is a form of preservation. The type of fermentation taking place is likely acetic, since the added vinegar could work as a starter, but it's also possible that you have a lacto component. It depends on the proportions of salt and vinegar used.
That said, as whatever bacteria and natural yeast get to work, they convert sugars naturally present in your vegetables to various acids, alcohol, and carbon dioxide. The production of carbon dioxide will indeed cause an increase in pressure and make a sealed jar leak.
As the fermentation settles down what will often happen is the lid will glue itself shut with a combination of partially digested sugars and salt that dry out. This doesn't really indicate negative pressure, but can make a jar a major pain to open.
As for how it works - the short version is comprised of two parts. Part one is that the good bacteria and yeast go through and eat everything, making it harder for bad bacteria to get a foothold. Part 2 is that as a result of the fermentation, the brine in the pickle jar is very acidic (not to mention salted) and therefore very unfriendly to most bacteria even if there was sugar to be had.
That's an extremely simplified version, obviously. But fermentation has a long, long history as food preservation. It's an absolute classic from a cultural perspective, and is biologically complex. I would make sure that grandma's recipe is written down (if you can), since it can be dangerous to fool around with an untested fermentation procedure. (I personally consider 50+ years to be &quot;tested&quot; enough...)