The building I live in in Berlin, 1910-ish construction with two more wings in the courtyard, everything accessible through the front gate - it has the same principle implemented with a timer and a button. I thought it's a bit odd, but made some sense after a while.
During the day, the front gate can be opened from the outside with just pushing a button that unlocks the door. At night (from 20 or 21 or so), the button stops working, you need the key. It can be opened at any time from the inside without keys. So it's more or less implementing the same protocol, but electro-mechanically, so there is no need for the trick with pulling the key inward.