In modern (post 70’s) buildings, the interior stairwell is the emergency fire exit. New York (and some other old cities in the US) buildings are stereotypically plastered with external emergency fire stairs because they are so old and their internal stairs aren’t fit (are actually a fire hazard) for emergency exit. The exterior fire escape is the exception to the building code, not the rule. They’re there to compensate for the fact the buildings predate most of our modern understanding of fire and other accidents management. Modern multi-story apartments are way more resilient to fire hazards than a 1920’s building, even when they are taller.
On the event of a fire you are supposed to leave your apartment and run down stairs, for which it should be: equipped with emergency lights, properly signalized to indicate exits, and use only doors with push bars towards the exterior. A well built building will have all rooms with a direct line of sight towards the apartment exit, fire alarms on every floor, extinguishers in all common areas (ideally every apartment should have one inside for the tenants), a fire hydrant or fire fighting water point in front of the building and a clearly signalized safe spot outside (distance away from the building so the risk of getting hit by something falling from the building during an earthquake is lower). The building should have fire retardant protection between each floor and between the common areas and the apartments.
This is not from any particular code, I’m no expert on any of that, just what I was taught from a firefighting volunteer friend, it is really good information to assess the safety of a building as a potential renter.