barcodes were originally used in transport , on railroads specifically. Found on the sides of railroad cars for identification, it was not until 1974 that they arrived in supermarkets. Their success sees them now used across almost all retail and logistics channels, as well as many other industries.
containers that fall off ships don't always sink immediately. It's estimated that a 20ft container will float for 57 days and a 40ft will float for around 171 days before sinking! That's nearly 6 months.