It is (or was?) quite common to have a valet key, which would start the car, but not open the trunk or glove compartment--and in some cases would limit the speed of the car to below e.g. 30mph, in case some valet tried to take the car for a Ferris Bueller-style joyride, I suppose!
Mercedes-Benz's have a pop-out metal clip that can be used to lock the glove and trunk. It's designed to be extract with a simple press so that dropping you car with a valet doesn't require turning off the car to remove it.
Clearly the lock isn't meant to stop a determined intruder. It's more of the "Locks are for honest people" type thing to indicate that you shouldn't be opening the glove or trunk.
My Supra has the valet key, which doesn't open the glovebox, but opens everything else - it's slightly shorter than the main key, so probably trivial to pick the glovebox lock anyway. The smart keys that limit the maximum speed are a nice feature - I think some manufacturers advertise them as being particularly suitable for learners!