It comes down to one's interpretation of the word directly. Fire and the products of combustion are the concern and the effort is dedicated to impeding the transfer of fire and gases from one space to another. In righter's example there is nothing to impede fire and gases from entering the sleeping room.R302.5.1 Opening protection. Openings from a private garage directly into a room used for sleeping purposes shall not be permitted. Other openings between the garage and
residence shall be equipped with solid wood doors not less than 13/8 inches in thickness, solid or honeycomb core steel doors not less than 13/8 inches thick, or 20-minute fire-rated doors. Doors shall be self-closing and self-latching.
Exception: Where the residence and the private garage are protected by an automatic residential fire sprinkler system in accordance with Sections R309.6 and R313,
other door openings between the private garage and the residence need only be self-closing and self-latching. This exception shall not apply to rooms used for sleeping
purposes.
Which layout serves the intent of the code? The stairway and no door to the bedroom or the stairway and a door to the bedroom? The stairway without the door or as in my example, the hallway without the door are no different than a door into the bedroom.
Now back to the word directly. Is it supposed to mean that I step through the door immediately into the bedroom? If that's the case, I can be creative and interrupt the path with a flight of stairs. That clearly goes against the intent.
Perhaps the code is written poorly but there's no mistaking whats at stake.