The roof is rarely a good escape route unless there are several ladders going down the ground. Even then, in my country, this would likely not pass inspection as 30meters of horizontal and 30 meters of vertical movement are the maximum for fire escape routes to a safe place (ie, a fire shielded stair case with no fire hazards, which requires special doors and monitoring that no flammable materials are stored there plus ventilation, or simply the outside of the building on the ground).
The roof is dangersou because if the fire gets too large, the fire fighters will be forced to switch from extinguish to control and the roof might be burned down. If nobody notices you up there or equipment to get you down takes too long, you're screwed. On the ground you can get more distance.