.
Containers are stacked but the doors are typically accessible wherever the containers are located. You just can't extract any large objects since there's not much room for maneuvering. Then again the pirates in speed boats or whatever they're using are not fit to transfer large stuff anyway.
Also, if the pirates have knowledge of all the containers (which may number several thousands) they can just select the containers based on ease of access.