The WTC (like all modern high-rises in the developed world) had a pretty impressive set of firefighting and evacuation infrastructure, procedures, and personnel. This training video goes through it pretty well [0].
- Smoke detectors and pull stations everywhere to ensure any fire is detected and responded to quickly (i.e. before it gets out of hand). There was a fire station across the street.
- A huge console for responding firefighters to see the location of alarm conditions, make building or floor-wide announcements, and even have two-way conversations with intercom stations on particular floors.
- Sprinklers and redundant power for the pumps that run them.
- Fans to push smoke out of the building and supply clean air to evacuation routes.
- Fire stairs, kept closed under positive pressure to keep smoke out, kept unobstructed by regular patrols, encased in material that wouldn't burn through for hours.
- A network of piping and wall-mounted hoses easily fed from the dedicated fire-truck parking.
- Fire drills, designated authorities for the evacuation of each floor, security personnel trained to watch over the fire alarm equipment.
It's not like the WTC wasn't prepared to evacuate in a fire. It's just that nobody anticipated all that infrastructure (pipes, stairwells, etc) getting sheared through by an airplane.