Though I don't have the common room experience that you had, I too regularly wake before my alarm goes off with more than enough time to turn it off.
The answer isn't that I have a clock in my brain, but rather that waking phases occur regularly during sleep. I start to wake up, think "what time is it?" and check my phone. If it's within 30 minutes of my alarm, I just turn my alarm off and get up.
For what it's worth, I have the same experience as you. I wake up, once, maybe a minute before the alarm is supposed to go off. And I'm immediately clearly awake, not groggy, not sleepy, no gradual slow awakening.
The answer isn't that I have a clock in my brain, but rather that waking phases occur regularly during sleep. I start to wake up, think "what time is it?" and check my phone. If it's within 30 minutes of my alarm, I just turn my alarm off and get up.
No magic required.