Because it would necessarily be heavier and more expensive than a regular container.  Regular containers have been optimized to be about as cheap as possible while meeting the specs.
If you also want to make it fold you are going to have to use stronger material in parts - plus things like the doors are going to be very difficult.<p>So you are likely to have a container that costs more, is heavier, isn't waterproof or as secure and is more expensive to handle. It's only benefit is lower volume for the return leg - volume isn't a big problem for ships.<p>It's like building a convertible - it always ends up heavier more expensive and less stiff than a regular car.