Centralizing agriculture far away and transporting pesticides and fertilizers to that site and then transporting the produce, sometimes half-way across the globe, represents a huge waste of energy, with the pollution that goes along with that.
Well... maybe. I've heard differing analyses on this. It's counterintuitive, but there are economies of scale associated with mass production. Trains are incredibly efficient, and so are the massive container ships: the square-cube law means you're moving more stuff and less vehicle. Local produce carried in the back of a pickup truck can burn as much fuel in 50 miles as a thousand miles in a freighter. There are similar economies of scale on the inputs: dragging fertilizer to a thousand local farms will be less efficient than one tanker full of it.
That's far from the whole story, of course. Local foods can take better advantage of local conditions (including less pesticides), can be better varieties since there's less shipping, are often mixed-use rather than monocultures. I know a local farmer who uses no fuel whatsoever on his farm... though a fair bit of energy is used hauling his produce from the country to the city, around 50 miles.
I do prefer to eat local when I can, but the fuel advantages aren't nearly as overwhelming as it might seem.