Before cargo that has been unloaded from the ship is allowed to leave the dock, Customs Officers will need to check the cargo type. Some cargo will be taxed and Customs will need to charge the importer the correct amount of tax or duty.
Customs Officers inspect thousands of containers. They make sure that importers are not trying to avoid tax. They look for drugs and other items which are illegal to import. Customs and Quarantine inspect containers to see if any goods could be carrying diseases or unwanted insects and other animals that cause problems for food growers and the environment.
They also look for weapons that could be used by criminals or terrorists.
Most containers are "inspected" using x-ray equipment. However, some containers are opened and inspected by Customs Officers. There are too many containers for all of them to be opened and inspected.
Customs Officers use intelligence received from many sources to target which containers should be opened and the contents inspected. Sometimes Customs Officers find drugs and weapons hidden in the cargo in a container.