At the beginning of "The Martian", did the commander see Mark before she was getting into the ship?
They don't get out of the ship.
They see the storm is coming, and decide they have to abort the rest of the mission and leave for the safety of all. What they leave is the habitat/quarters/installation, and they go TO the ship so they can leave.
It would be the Earth equivalent of a hurricane coming, so you leave your house to get into your car, parked in the driveway, so you can drive to safety.
The Mars expedition team has been on Mars for about a month now, after ~9 months of travel to Mars. They are in the middle of routine research tasks, collecting data and samples for science. They are living, camping really, in the HAB, a habitat built on Mars. Their main spaceship is in orbit, and the Mars Descent Vehicle (MDV) was a one way ship. The ship they get in is the Mars Ascent Vehicle, the MAV, also a one trick pony.
Mars has regular dust storms, but the one that hit was SO OVERPOWERED that they had to leave as an emergency.
They left the HAB, a makeshift building, for the MAV because otherwise they would die or get stranded on Mars because of the storm.