Five switches controlling one light. How?

Oh, the stairway light is also the hall light? Recent electrical code requires (1) switches for stairwell lights at both the top and the bottom of the stairs and (2) switches for hallway lights at each “entry” into the hallway. for example, in my previous house three bedrooms had their entrances clustered at one end of a hallway. There was one switch controlling the hallway light next to the bedroom doors and one switch at the other end of the hallway. Similar set for the hallway to the master bedroom.

Since in the case you describe the same light serves both the stairway and the hall, what you describe is required by code (although whether each bedroom requires its own switch depends on how far the doorways are separated - if close enough they could share one switch in the hall).