This is false information that is commonly repeated. The ships produce more of a particular pollutant, sulfur dioxide (SO2), not CO2. Personal vehicles produce barely any SO2 (gasoline contains no sulfur, diesel contains a small amount) so it isn't surprising a few container ships, which burn sulfur-heavy bunker fuel, produce more.