Pickle Accompanying Hotdogs, Burgers, Sandwiches in the US The following was observed in the US --- it may be an American phenomenon.

I have recently observed in my restaurant visits that more often that not, if I order a burger, sandwich, or a hotdog, I am often served, in addition to the dish and side-dish, a single quarter-slice of a long pickle. Why is this done? The pickle is obviously much too large to put on my sandwich or burger --- slices of pickles would be better for this purpose. I also can't squeeze the juice onto the dish. All I can do with the pickle is essentially eat it raw and whole. This strikes me as curious. I don't see why it is included.

Intuitively, it seems to me that this must be a traditional custom. What is the origin of this custom? Why do restaurants do this so frequently?
Yes, you eat the pickle, if you like pickles - plenty of people do. You certainly won't get a pickle everywhere, but it's pretty common in deli/sandwich/burger type places.

I could be wrong, but I doubt there's any specific origin, and if there is, I expect it's pretty unremarkable - just someone who happened to do it first. Lots of cultures make one kind of pickle or another (or a dozen), and eat them as condiments/accompaniments. It's not surprising; it's one of the easiest and oldest ways to preserve food. Pickled cucumbers have existed for a long time in Europe too, so it's not surprising they're common in the US. The dill pickle spear is just by far one of the most common ones in the US, along with slices (often sweeter, called bread and butter pickles). The fact that they're the same everywhere is presumably just a product the industrialization of food production, like everything else we eat across the country.