"pathological craving for substance unfit for food" (such as chalk), 1560s, from Medieval Latin pica "magpie" (see pie (n.2)), probably translating Greek kissa, kitta "magpie, jay," also "false appetite." The connecting notion may be the birds' indiscriminate feeding. Compare geophagy.
As the magpie eats young birds, here is the bird to keep the sparrows' numbers in check, for it will live in towns and close to dwellings—just the localities sparrows frequent. The magpie's appetite is omnivorous, and it is charged with at times killing weakly lambs, and varying its diet by partaking of grain and fruit; but I never at Home heard any complaints of this bird from the farmers, whilst the gamekeepers had not a good word for it. The bird will eat carrion, so if one were disturbed taking a meal from a dead lamb it would probably be blamed for its death, which may have occurred from natural causes. [A. Bathgate, "The Sparrow Plague and its Remedy," in Transactions of the New Zealand Institute, 1903]