Why is it assumed that the ship is only designed to be opened in space? I assume that the spaceship is designed to lift off and land at a ground based spaceport.
If not on a planet, what about inside a massive hanger bay? The U.S.S. Enterprise doesn't land on planets - but it does spend some time inside massive pressurized bays in space dock.
It's obvious that a ship would be designed to land and/or berth somewhere - unless it's the space station designed to do the berthing.
When it's on the ground or in the docking bay - and powered down... how do you get inside? How many ports open when a 747 lands? wheels, gas inputs, luggage exchange, passenger ports, pilot windows, etc.
Those ports are designed to be closed and secured during the normal operation... but when "grounded", they are designed to give access to various parts for various functions.
Out of all of those ports - not all of them are designed to be locked via electronic means. Some are sealed shut from the inside. Some are simply closed. Some have panels on the outside to allow access to various components.
Look at the access ports for conventional planes, ships, ISS, etc. Those ports will still exist on the future generation of spaceships.