When most small boats are at a dock, they typically make an electrical connection to shore power, obtaining 120-VAC from the marina or dock facility. Some larger boats may connect to 240-VAC shore power. Big boats typically can't access electricity that would be needed and so run their own power generation plants when connected to a dock during loading or unloading for a day or two. They just continue to run on electrical power they generate themselves, running their often dirty, diesel engines in port. These emissions are historically not well regulated by local emissions laws as they are considered an itinerant emitter.
Via PIRatE Lab