Pressure is just the force that a substance is applying outwards to everything in contact with it; the substance "trying to expand" if you will. If there's no balancing force pushing back the other way, then the substance will expand.
The pressure of water in the open ocean is equal to the weight of the column of water above it, but the presence of a column of water is not the cause of all pressure. The reason pressure is equal to the weight of the water above it is simply that the pressure is what is supporting the water, balancing out the force of gravity. The weight of the water above is what's stopping the pressure from making the deep water expand, and the pressure is what's stopping the water above from moving down.
If the pressure were higher then there would be a net imbalance and the water would experience an upward force. Since there's no more water coming in at the bottom but the top of the water is moving up, the same amount of water has to redistribute over a larger volume; the density goes down, and thus the pressure goes down.
If the pressure were lower than the weight then the water above would be partially unsupported; it would move down. This compresses the water at the bottom; the density goes up, and thus the pressure goes up.
So if the pressure is higher or lower than the weight of the water above it, the situation will self-adjust towards an equilibrium where they are equal. But storing water above some other water doesn't magically cause pressure; it's just two forces that are in balance, and we find them in balance because if they were out of balance they self-adjust until they are balanced again.
Now when you're talking about sealing water in a container, these two forces (the pressure of the contained water and the weight of the water that used to be above it) are no longer in direct contact with each other, and have no mechanism to self-adjust. They are now unrelated.
Instead the pressure of the contained water is pushing outwards on the container. If the container were perfectly rigid and infinitely strong, it would push back on the water with exactly the same force, keeping it contained in exactly the same volume and exactly the same pressure. This situation would continue wherever you took the container - to the surface of the ocean, the vacuum of space, or the centre of the earth. It is the structural forces of the container that maintain the pressure of the water inside.
Real containers, of course, are not perfectly rigid or infinitely strong. The water inside is pushing outwards and trying to expand. While you're still at the depth where you sealed the container, you are surrounded by water at the same pressure, so there is also an equivalent force of pressure on the outside of the container pushing in. That helps to hold the pressure of the water in. But as you rise to the surface, there is less pressure outside than inside the container. This imbalance will deform the walls of the container outward, which increases the interior volume, which lowers the pressure.
Exactly what happens depends on the material properties of the container. It might be able deform very little and exert enough force to balance the pressure inside even with much lower pressure outside (such as sea-level instead of deep ocean), allowing you to have a container of high pressure water. Or it might be able to deform enough without breaking to allow the contained water to expand enough to drop the pressure to sea-level, in which case you'll have a container that is still sealed, but the pressure inside has dropped as you ascended and is basically the same as surface-level. Anything in between is a possible outcome, depending on the properties of the container. Water is fairly incompressible, which means it actually doesn't need to expand/compress very much to change pressure by a lot. (And of course if the container hits the limits of how much it can deform and is not strong enough to contain the pressure difference, it will rupture and release the pressure that way)