According to the Cambridge Dictionary, "Pettifogging people give too much attention to small, unimportant details in a way that shows a limited mind."
On that note, let's dive in.
Petty + fogger = pettifogger
Petty means small or insignificant. A fogger is old slang for a "huckster, a cringing whining beggar."