>>8620678It's not really about the shape (it helps) but the overall mass, or density. As long as the amount of water the object pushes out by it's weight is heavier than the object itself, it floats.
Those cargo are not solid metal inside. having some air pockets makes them essentially same as boats.