Just like the title. My entirely unfounded assumption is that it had something to do with pigs and farmers, but we all know how surprising history can be!
Hi, you might try x-posting this to /r/etymology: that's the study of word origins
The earliest attestations show no evidence of actual pigs being involved. It seems to have derived from a term for carrying a pack on your back. "To pitch a pack" was to carry something on your back. And 'pitch' is a variant of the word 'pick' meaning the same thing and also attested in the same context.
So it most likely grew out of a sing-song colloquialism like 'pick-a-pack'. Carrying something 'pick pack' is attested as early as the mid 16th century.