1560s, from petty; the second element possibly from obsolete Dutch focker, from Flemish focken "to cheat," or from cognate Middle English fugger, from Fugger the renowned family of merchants and financiers of 15c.-16c. Augsburg. In German, Flemish and Dutch, the name became a word for "monopolist, rich man, usurer."
However, OED also calls attention to pettifactor "legal agent who undertakes small cases" (1580s), which, though attested slightly later, might be the source of this. Related: Pettifoggery.