Devices of this type are used for a couple purposes.
One is to store keys to a nearby door. You flip down the cover and it exposes a keypad. Inside is the key to the door. It's often used, for example, for parts lockers. This way, you can give out the combo to people who are supposed to be...