Locked containers are used by the smuggler profession to raise their slicing skill. A smuggler with slicing can unlock it for you. You may see people shouting at starports that they are slicing locked containers for free and you keep the contents, these are smugglers trying to gain xp in slicing.
You may find smugglers paying you for the chance to unlock your container and you still get to keep what is in it. I've seen smugglers offering 5k or so to unlock your container.
There will be some things inside, but mostly it will be just junk items like basic weapons or ONE unit of a resource.
So, if you aren't planning on being a smuggler, Id suggest just selling it on the bazaar for about 3k or offering it to a smuggler to open for you. Once its unlocked and you have retrieved the item the container is useless, destroy it or put it in your house as decoration.