The room answers those in great need. Therefore walking by three times is not a requirement.
In the story, Dobby specifies that Harry has to walk by the room three times to get the Room of Requirement to answer him. But this is when Harry is doing it deliberately. The students that found out about the room were in great need, and the room (called the Room of Requirement) answered. Harry's need was not a life-and-death or a safe-and-punishment, but rather a search-and-search-again need.
Below are a few scenarios, from the book.
Scenario 1 (automatic appearance)
Dumbledore has an unusually full bladder and walks by the Room of Requirement. The Room of Requirement senses that he really needs to go the bathroom and appears.
Dumbledore did not walk back and forth three times asking for a room of chamber pots (although is sounds like something Dumbledore would do -).
Scenario 2 (walking back and forth):
Harry needs to find a room for DA. He walks to the Room of Requirement. The Room of Requirement senses that he does not have a great enough need and that he will walk back and forth three times. Therefore, the room waits for him to do the walking and asking.
Scenario 3 (great need, but walking):
Harry needs to hide his potions book. He runs to the Room of Requirement with great need. The room senses his need but knows that he will do the walking and asking because Harry thinks that walking (or running, in this case) is the only way to open the Room of Requirement.