They took the escalator up to their room. Pansy was holding the key. Only the key could open the door, otherwise a simple alohomora could easily be performed on the lock. So the room was sealed with magic linked to a single key. 